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
Babel "loose" option error spamming in console on fresh project #9224
Comments
Same to me :( |
For me too. Whichever version of Nuxt I'm use, it's the same. I don't know if this is caused by this, but after some time the refresh stops responding and to see the changes you have to close the process and restart "nuxt dev".
|
The same |
Same problem here. |
With yarn, please pin your babel deps manually in your "resolutions": {
"@babel/core": "7.13.15",
"@babel/preset-env": "7.13.15"
} With npm, add these as dev deps (with the same versions). |
Thanks. This works for me! |
@manniL Thanks ..It works fine for npm also. But shouldn't the create-nuxt-app add those devDependencies by default while creating the project? |
The root cause seems to be commit #6435 which explicitly sets |
how to fix this with npm |
I fixed this by adding babel setting to the build section:
to the nuxt.config.js file. |
I'm having this problem as well. I'm not even using babel, unless nuxt or another packages uses it? |
In short, this is what the Babel website says about itself:
@rickalex21 You will be in for an extremely bumpy and information dense ride. Babeljs has been part of many javascript build tooling for a very long time and therefor shouldn't be a surprise for any frontend developer. |
@xtrasmal Thanks for the info. I wasn't having these problems in hugo. I started using vuepress and so far so good, no errors or warnings. |
/cc @clarkdo |
The warning will be fixed in #9232. |
Ahh im not the only one, i'm trying to update :P thanks guys |
@pi0 @clarkdo I created a new project by running
I ultimately fixed it by running |
@heyshadowsmith The fix has not been released yet, that's why @pi0 reopened this issue. |
This comment has been minimized.
This comment has been minimized.
In
|
I see that there is a fix that has not been released yet however my nuxt projects are actually not running now that I'm getting these sudden console errors. They are just loading and hanging in a loading state. From earlier comments some people seem to still be able to run their projects. Could this be a seperate issue for me? |
Also if I add the plugin: [['@babel/plugin-proposal-private-methods', { loose: true }]], to my nuxt config I get the following error: Error: Failed to load config "developit" to extend from. |
Thank you, it worked for my project 😊 |
Still happening for me in nuxt-edge, therefore I assume there is more work needed to fix this |
Interesting, using
worked for me. Question is, what is this suddenly. |
Should be fixed in v.2.15.5 (PR: #9232). You can safely revert In case of having same issue after upgrading to 2.15.5, please remove lock file ( If having a different error after upgrading, please use a new issue to report. |
@pi0 , Having same issue after upgrading to 2.15.7, but found this work for me. plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-private-methods',
], https://github.com/babel/babel/issues/11622#issuecomment-638609015 |
@Quineone Can you provide a reproducible repo ? |
I wonder if this resurfaced somehow as I've seen this happening just yesterday in a repo that only has the latest dependencies. You could try on https://codesandbox.io/s/nuxt-nuxtjsi18n-base-template-2szv3. |
@clarkdo Here's one https://github.com/bhpcv252/nuxt-project. Just created it using Facing the same issue. |
Thanks, I’ll look into it |
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
babel: {
plugins: [['@babel/plugin-proposal-private-property-in-object', { loose: true }]],
}
} Fixes the issue for me for time being. |
This will be fixed in #9631. |
Ah yes, victory! |
It maybe worth your will to review the following article. Thanks https://www.linkedin.com/pulse/nuxtjs-warn-though-loose-option-set-false-your-babelpreset-env-/ |
// Build Configuration: https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-build |
thnaks it also works for me
|
One solution worked on Linux, a different in Windows, so I rolled them both in since I code at work on Windows and the rest of the time I'm on Linux;
|
Hi, in the version v2.15.8 this has worked:
|
Doesn't work either ;(
|
Thanks alot. This worked |
Versions
Reproduction
Just make a new project on CodeSandbox and you'll see the error.
Here is one I just made: https://codesandbox.io/s/serene-thunder-yl6rq
Steps to reproduce
What is Expected?
No random warnings.
What is actually happening?
The warning...
...is spammed over and over again.
The text was updated successfully, but these errors were encountered: