ERR_REQUIRE_ESM: require() not supported #9582
-
I am currently updating the web application from vue 2 to vue 3, but I can't get any further as the app can no longer be started because I get the following error message. Error [ERR_REQUIRE_ESM]: require() of ES Module node_modules\strip-ansi\index.js from node_modules@vue\cli-shared-utils\lib\logger.js not supported. Instead change the require of index.js in node_modules@vue\cli-shared-utils\lib\logger.js to a dynamic import() which is available in all CommonJS modules. Found out that you no longer use require() but import. However, this is an external package. How can I fix this? vue.config.js
tsconfig.json
package.json
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Could fix it by updating all dependencies and delete |
Beta Was this translation helpful? Give feedback.
Could fix it by updating all dependencies and delete
yarn.lock
and reinstall the dependencies.