You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have a project with "type": "module'' set. Now JSDoc is complaining that:
> babel jsdoc.js --config-file ./babel2.config.js -o temp.cjs &&
jsdoc -c temp.cjs
Cannot parse the config file temp.cjs: SyntaxError: Unexpected n
on-whitespace character after JSON at position 12
Exiting JSDoc because an error occurred. See the previous log me
ssages for details.
There are no input files to process.
if I insist on using .js I got another error:
Cannot parse the config file temp.js: Error [ERR_REQUIRE_ESM]: r
equire() of ES Module /path/to/temp.js fr
om /path/to/node_modules/jsdoc/cli.js not
supported.
temp.js is treated as an ES module file as it is a .js file whos
e nearest parent package.json contains "type": "module" which de
clares all .js files in that package scope as ES modules.
Instead either rename temp.js to end in .cjs, change the requiri
ng code to use dynamic import() which is available in all Common
JS modules, or change "type": "module" to "type": "commonjs" in
/path/to/package.json to treat all .js fi
les as CommonJS (using .mjs for all ES modules instead).
Exiting JSDoc because an error occurred. See the previous log me
ssages for details.
There are no input files to process.
As title.
So I have a project with
"type": "module''
set. Now JSDoc is complaining that:if I insist on using
.js
I got another error:related
#2035
#2006
The text was updated successfully, but these errors were encountered: