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
I was playing around with this project, see if could get some docs built out for some open source. However, I could not get it to run as I am getting this error:
npx code-narrator
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/box/structures/structures-js/structures-api/code-narrator.config.js from /Users/box/.npm/_npx/e378fa2a901701d1/node_modules/code-narrator/dist/src/utils/CliHelper.js not supported.
Instead change the require of code-narrator.config.js in /Users/box/.npm/_npx/e378fa2a901701d1/node_modules/code-narrator/dist/src/utils/CliHelper.js to a dynamic import() which is available in all CommonJS modules.
at /Users/box/.npm/_npx/e378fa2a901701d1/node_modules/code-narrator/dist/src/utils/CliHelper.js:73:96
at async CliHelper.getConfig (/Users/box/.npm/_npx/e378fa2a901701d1/node_modules/code-narrator/dist/src/utils/CliHelper.js:73:30)
at async /Users/box/.npm/_npx/e378fa2a901701d1/node_modules/code-narrator/dist/src/cli.js:12:22 {
code: 'ERR_REQUIRE_ESM'
}
I did need to modify the code-narrator.config.js to use import statements and not use require to get past the first error.
I believe using vite might be a better build tool, as it should allow building for both CommonJS and ESM. If I find the time, I might play around with this and see if can get it to work.. just don't have the time right now.
The text was updated successfully, but these errors were encountered:
I was playing around with this project, see if could get some docs built out for some open source. However, I could not get it to run as I am getting this error:
This is the folder within the open source I am trying to test this against. https://github.com/Kinotic-Foundation/structures/tree/main/structures-js/structures-api
I did need to modify the
code-narrator.config.js
to useimport
statements and not userequire
to get past the first error.I believe using vite might be a better build tool, as it should allow building for both CommonJS and ESM. If I find the time, I might play around with this and see if can get it to work.. just don't have the time right now.
The text was updated successfully, but these errors were encountered: