Skip to content
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 plugin error after upgrading nuxt to 2.15.8 #9686

Closed
bkuri opened this issue Aug 17, 2021 · 6 comments
Closed

Babel plugin error after upgrading nuxt to 2.15.8 #9686

bkuri opened this issue Aug 17, 2021 · 6 comments

Comments

@bkuri
Copy link

bkuri commented Aug 17, 2021

Versions

  • nuxt: 2.15.8
  • node: 14.17.1

Reproduction

Additional Details
See error gist here

Steps to reproduce

  • Upgrade nuxt to 2.15.8
  • Start dev server

What is Expected?

Nuxt not to crash

What is actually happening?

Nuxt crashes

@driule
Copy link

driule commented Aug 18, 2021

Can confirm, the same issue for us.

ERROR in ./.nuxt/client.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /var/www/html/project-web/.nuxt/client.js: @babel/preset-env: The plugins/built-ins '@babel/plugin-proposal-private-property-in-object' passed to the 'exclude' option are not
    valid. Please check data/[plugin-features|built-in-features].js in babel-preset-env (While processing: "/var/www/html/project-web/node_modules/@nuxt/babel-preset-app/src/index.js$0")

@bkuri bkuri changed the title Bebel plugin error after upgrading nuxt to 2.15.8 Babel plugin error after upgrading nuxt to 2.15.8 Aug 18, 2021
Copy link
Member

@bkuri Would you try recreating your lock file to see if the error persists? If so, would you provide a reproduction? 🙏

Note: Related to #9631.

@ayumitamai97
Copy link

ayumitamai97 commented Aug 23, 2021

I encountered the same problem and managed to solve it by recreating yarn.lock. Thanks!

node version: v12.16.3

Part of my package.json:

{
  "dependencies": {
    "@babel/core": "^7.15.0",
    "@babel/preset-env": "^7.15.0",
    "@nuxt/types": "^2.15.8",
    "babel-core": "^7.0.0-bridge.0",
    "babel-jest": "^27.0.6",
    "nuxt": "^2.15.8",
    // ......
  },
  // ......
}

@bkuri
Copy link
Author

bkuri commented Aug 25, 2021

@danielroe looks like that fixed it. Thanks!

@bkuri bkuri closed this as completed Aug 25, 2021
@weotch
Copy link

weotch commented Aug 31, 2021

If you don't want to nuke your whole yarn.lock, you can delete just the @babel/... portions of it and then run yarn install again. It will recreate just the Babel parts. This resolved the issue for me.

@Cally99

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants