-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Nuxt not building due to upstream @babel/preset-env change #8882
Comments
I've reported this issue to the Babel team: babel/babel#12856 |
the same for me but for nuxt version |
`@babel/preset-env` shipped a change that broke Nuxt.js usage of the module, so here we add a `yarn.lock` file that pins the preset-env version to 7.12.17. See: nuxt/nuxt#8882
`@babel/preset-env` shipped a change that broke Nuxt.js usage of the module, so here we add a `yarn.lock` file that pins the preset-env version to 7.12.17. See: nuxt/nuxt#8882
Any workaround at the moment? |
Workaround is to pin |
Doesn't work either EDIT: My bad, I used |
Worked for me:
|
Is there a workaround for people using npm instead of yarn? |
@thederekkaplan npm doesn't support natively, but you can check this package |
@tkrause |
@thederekkaplan , I found the answer here by hzoo.
it should do the trick. |
Following |
Worked from me: Add this on devDependencies:
or
Install corejs@3
and update build.babel in nuxt.config.js
|
yes it works for me 👍 |
Thanks for report. Issue is solved in 2.15.2 by pinning If for any reason cannot upgrade to "resolutions": {
"@babel/preset-env": "~7.12.17"
} If using npm, should additionally use npm-force-resolutions "scripts": {
"preinstall": "npx npm-force-resolutions"
} |
FYI, you can just press the subscribe button on the right side, no need to comment ;) |
now only this one is working for me, I am using cnpm without yarn nor npm.. |
You can try to do: // package.json
"devDependencies": {
+ "@babel/preset-env": "7.12.17",
"cross-env": "^5.2.0",
"css-loader": "^3.2.0",
"node-sass": "^4.14.1",
"sass-loader": "^8.0.2",
"style-loader": "^1.0.0"
},
// package-lock.json
"@babel/preset-env": {
+"version": "7.12.17",
...,
"@nuxt/babel-preset-app": {
"requires": {
"@babel/preset-env": "7.12.17",
...
}
}
} |
Works for me! :) |
Just to clarify status of this issue it is fixed in latest versions of both preset-env and nuxt. So it is recommended to recreate-lock file and use latest versions and avoid pinning to 7.12 :) |
Thank you all. I may be still astray, shouldn't this 173f48b be reverted? @nuxt/babel-preset-app==2.15.2 keeps requiring @babel/preset-env~7.12.17 |
you can run this comment for this issue
or
|
在欢乐时,朋友们会认识我们;在患难时,我们会认识朋友。谢谢,来信!!!
|
Versions
Reproduction
Make a new project and try to build it.
Steps to reproduce
See above
What is Expected?
It should build and show the welcome page.
What is actually happening?
The build fails with the error log.
This is caused by upstream package @babel/preset-env. Starting from version 7.12.17 which is the current minimum version, the utils.js file no longer exists.
To fix this, Nuxt would either need to upgrade to support or lock the package version to 7.12.16. I've done this on my local package.
The text was updated successfully, but these errors were encountered: