-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module not found: Error: Can't resolve 'core-js/modules/es6.array.iterator' in '/app/.nuxt' #5287
Comments
i hate @CMTY no one answer anything there and not on the search on google :S stop closing issues |
@bimohxh did you find any solution for it ? |
any solution for this |
@heshamelmasry77 clean lock file and node modules and resintall, if it dont help -> add core-js@2 at your project |
Same issue with nuxt 2.6.1. "core-js": "^2.6.5" fixed the issue |
yarn add core-js |
不要用 cnpm,换成 npm 即可 |
package.json
It works! |
I just updated the dependencies and I get this error |
@riux try @yoelnacho answer. I had to |
I still got this error. Adding core-js manually is not the best option since it breaks modern build @pi0 any advices? |
Having the same issue on my deployment server..., even adding core-js manually won't work for me. |
We were getting the same issue after doing an npm install. The issue started when we installed file-loader for adding a specific sound file. Thereafter, referted back from using file-loader and uninstalled it. We the started getting the error messages of core-js not resolved. We added core-js manually, however this installed the latest corejs version (3.x) and did not work. Had to manually add core-js :
However, this is very 'hacky' solution since this message appears when installing:
Our project is working now, but for how long untill it is no longer support. It also feels 'hacky' since core-js was never required to be manually installed. |
Same here! Why is this closed? 🤔 |
I keep getting this error randomly in various long-running projects, usually after upgrading nuxt. Just got it again after upgrading to Using npm or yarn, deleting node_modules and the lock file, all did not work except manually installing core-js v2 like mentioned above. Is there an official solution for this problem? I get it for months now randomly. |
I have only done what they propose here and everything works perfectly in 2.11.0 👍 |
@wanxe @filrak I solved it by following the steps outlined here: https://www.npmjs.com/package/@nuxt/babel-preset-app#example-2-use-core-js3 In addition, I clean up my nuxt.config.js file by outsourcing the babel config in its own babel.config.js file. nuxt.config.js
babel.config.js
|
Same here on 2.11 with |
I was having issues using npm. Fix was to remove package.lock, remove node_modules, add "core-js": "^2.6.5" to deps and run yarn install. |
Hey Guys, |
I've deleted the yarn-lock.json file and i ran "yarn" again. It worked. |
I noticed the error occured when i upgraded some dependecies like bootstrap-vue from 2.0.0 to 2.9.0 and nuxt from 2.0.0 to 2.12.1 |
Getting the same error after adding Removing
|
why there no core team answering this problems, like where are they, they supposed to helps us, not to let us fighting this error, I am disappointed |
Guys, following the docs resolved the issue: https://nuxtjs.org/guide/release-notes#v2.6.0 yarn add -D core-js@3 @babel/runtime-corejs3
# or
npm i -D core-js@3 @babel/runtime-corejs3 Then edit export default {
build: {
babel: {
presets({ isServer }) {
return [
[
require.resolve('@nuxt/babel-preset-app'),
// require.resolve('@nuxt/babel-preset-app-edge'), // For nuxt-edge users
{
buildTarget: isServer ? 'server' : 'client',
corejs: { version: 3 }
}
]
]
}
}
}
} |
Can verify @jjangga0214 solution works. Thank you. |
After install |
@isuke01 |
Thank you! Works :) |
It's still not ideal:
|
yeah, I just encountered this issue too :/ |
Solution works |
Hi @lil-armstrong thanks for the links! I appreciate it! |
For me I encountered this issue after I upgrade some dependencies using Edit: @jjangga0214 is right. Just checkout which version of core-js has been installed in the |
if you are using Yarn you can add resolutions to your package.json like so
|
how did you fixit? |
remove node_modules and lock file then install dosen't work, but npm install core-js@2 works |
Simple and painless solution. Just add or update core-js. for npm:
for yarn:
|
Version
v2.4.5
Reproduction link
https://github.com/nuxt/nuxt.js
Steps to reproduce
just remove your node_modules and npm install and npm run build
What is expected ?
build success
What is actually happening?
build error
Module not found: Error: Can't resolve 'core-js/modules/es6.array.iterator' in '/app/.nuxt'
@ ./.nuxt/client.js 15:0-44
@ multi ./.nuxt/client.js�[39m�[22m
�[1m�[31mERROR in ./.nuxt/utils.js
Module not found: Error: Can't resolve 'core-js/modules/es6.date.to-string' in '/app/.nuxt'
@ ./.nuxt/utils.js 6:0-44
@ ./.nuxt/client.js
@ multi ./.nuxt/client.js�[39m�[22m
�[1m�[31mERROR in ./.nuxt/client.js
Module not found: Error: Can't resolve 'core-js/modules/es6.function.name' in '/app/.nuxt'
@ ./.nuxt/client.js 14:0-43
@ multi ./.nuxt/client.js�[39m�[22m
�[1m�[31mERROR in ./.nuxt/index.js
Module not found: Error: Can't resolve 'core-js/modules/es6.function.name' in '/app/.nuxt'
@ ./.nuxt/index.js 6:0-43
@ ./.nuxt/client.js
@ multi ./.nuxt/client.js�[39m�[22m
....
Additional comments?
this maybe caused by babel use
core-js@3
babel/babel#7646
https://github.com/babel/babel/releases/tag/v7.4.1
The text was updated successfully, but these errors were encountered: