Skip to content

Commit

Permalink
Class constructor cannot be invoked without 'new'
Browse files Browse the repository at this point in the history
> [email protected] build ${HOME}/.config/obs-studio/plugin_config/obs-midi/docs
> npm run comments && npm run docs


> [email protected] comments ${HOME}/.config/obs-studio/plugin_config/obs-midi/docs
> node ./comments.js

${HOME}/.config/obs-studio/plugin_config/obs-midi/docs/comments.js:17
        response = response.concat(parseComments(f));
                                   ^

TypeError: Class constructor Comments cannot be invoked without 'new'
    at ${HOME}/.config/obs-studio/plugin_config/obs-midi/docs/comments.js:17:36
    at Array.forEach (<anonymous>)
    at parseFiles (${HOME}/.config/obs-studio/plugin_config/obs-midi/docs/comments.js:15:11)
    at Object.<anonymous> (${HOME}/.config/obs-studio/plugin_config/obs-midi/docs/comments.js:98:34)
    at Module._compile (internal/modules/cjs/loader.js:1251:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
    at Module.load (internal/modules/cjs/loader.js:1100:32)
    at Function.Module._load (internal/modules/cjs/loader.js:962:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] comments: `node ./comments.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] comments script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     ${HOME}/.npm/_logs/2020-10-10T14_32_06_217Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `npm run comments && npm run docs`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     ${HOME}/.npm/_logs/2020-10-10T14_32_06_250Z-debug.log
  • Loading branch information
Luxcium authored Oct 10, 2020
1 parent 9b46f4f commit 1f90c95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/comments.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const fs = require('fs');
const path = require('path');
const glob = require('glob');
const parseComments = require('parse-comments');
const ParseComments = require('parse-comments');
const config = require('./config.json');

/**
Expand All @@ -14,7 +14,7 @@ const parseFiles = files => {
let response = [];
files.forEach(file => {
const f = fs.readFileSync(file, 'utf8').toString();
response = response.concat(parseComments(f));
response = response.concat(new ParseComments(f));
});

return response;
Expand Down

0 comments on commit 1f90c95

Please sign in to comment.