When I upgrade to v3.0, then "npm run dev", Oops, There is the following error, you have encountered? #9557
Unanswered
Chasen-Zhang
asked this question in
Q&A
Replies: 1 comment
-
Hi, It seems you have an error with npm and node, make sure to use the right version, (i recommend using nvm to manage your node versions) Have you correctly followed the migration guide of docusaurus ? It would be also better to push your website to a github repo to take a deeper look at it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
npm WARN cli npm v9.5.1 does not support Node.js v17.9.1. You should probably upgrade to a
npm WARN cli newer version of node as we can't make any promises that npm will work with this
npm WARN cli version. This version of npm supports the following node versions:
^14.17.0 || npm WARN cli ^16.13.0 || >=18.0.0
. You can find the latest version at https://nodejs.org/.npm WARN cli npm v9.5.1 does not support Node.js v17.9.1. You should probably upgrade to a
npm WARN cli newer version of node as we can't make any promises that npm will work with this
npm WARN cli version. This version of npm supports the following node versions:
^14.17.0 || npm WARN cli ^16.13.0 || >=18.0.0
. You can find the latest version at https://nodejs.org/./Users/chasen/Documents/fork-project/d-docs/node_modules/cli-table3/src/utils.js:1
const stringWidth = require('string-width');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/chasen/Documents/fork-project/d-docs/node_modules/string-width/index.js from /Users/chasen/Documents/fork-project/d-docs/node_modules/cli-table3/src/utils.js not supported.
Instead change the require of index.js in /Users/chasen/Documents/fork-project/d-docs/node_modules/cli-table3/src/utils.js to a dynamic import() which is available in all CommonJS modules.
at Object. (/Users/chasen/Documents/fork-project/d-docs/node_modules/cli-table3/src/utils.js:1:21)
at Object. (/Users/chasen/Documents/fork-project/d-docs/node_modules/cli-table3/src/table.js:2:15)
at Object. (/Users/chasen/Documents/fork-project/d-docs/node_modules/cli-table3/index.js:1:18)
at Object. (/Users/chasen/Documents/fork-project/d-docs/node_modules/@docusaurus/core/lib/commands/swizzle/tables.js:13:46)
at Object. (/Users/chasen/Documents/fork-project/d-docs/node_modules/@docusaurus/core/lib/commands/swizzle/components.js:18:18)
at Object. (/Users/chasen/Documents/fork-project/d-docs/node_modules/@docusaurus/core/lib/commands/swizzle/index.js:14:22)
at Object. (/Users/chasen/Documents/fork-project/d-docs/node_modules/@docusaurus/core/lib/index.js:22:17)
at async Promise.all (index 0) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v18.16.0 MacOS
Beta Was this translation helpful? Give feedback.
All reactions