Reason: the installed version of core-js is too old and needs to be replaced with a newer version.
Solution:
1 Delete original version
npm rm -rf node_modules
2. install the latest version
npm install core-js@latest
Note:
you cannot directly install a new version. You must first delete the original version dependency, and then install a new version to avoid errors!
Read More:
- [Solved] This dependency was not found: * core-js/modules/es.error.cause.js in ./node_modules/_@babel_runtim
- Module not found: Error: Can‘t resolve ‘core-js/modules/es.promise.js‘ in
- [Solved] To install it, you can run: npm install –save core-js/modules/es.error.cause.js
- runtime-core.esm-bundler.js5c406620 [Vue warn] Unhandled error during execution of native event h
- JS async await Error: Uncaught SyntaxError: await is only valid in async functions and the top level bodies of modules
- Module build failed: Error: Couldn’t find preset “es2015” relative to directory
- [Solved] Nuxt Import qrcodejs2.js / QRCode.js Error: document is not defined
- [Solved] webpack Package Error: ERROR in multi ./src/main.js ./dist/bundle.js Module not found: Error: Can‘t resolv
- Solution to build error in Vue project (error in static/JS)/vendor.xxxxx.js from UglifyJs)
- Solution to some map files in JS folder after Vue packaging (remove the map. JS file)
- [Solved] Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor‘
- [Solved] error C:\Users\HP\Desktop\VueProject\vue_cli\node_modules\node-sass: Command failed.Exit code: 1
- error in ./node_modules/@lit/reactive-element/decorators/state.jsModule parse failed: Unexpected
- node.js yarn Error: SyntaxError: Unexpected string [How to Solve]
- [Solved] Temporary error: Error: spawn E:\vue3-vite\my-app\node_modules\esbuild\esbuild.exe ENOENT
- Vue Package Image Error: Syntax Error: Error: ‘**\node_modules\pngquant-bin\vendor\pngquant.exe‘
- [Solved] Node.js v17 npm run dev Error: opensslErrorStack
- [Solved] Uniapp project use vant icon Error: (module build failed from./node_modules/postcss loader/SRC/index)
- Using for in loop complex data types (object and array) in ES6
- Node.js Error: Error: Cannot find module ‘express‘ [How to Solve]