nuxt / create-nuxt-app

Create Nuxt.js App in seconds.
MIT License
3.47k stars 428 forks source link

Dev server crashes after clean installation | @babel/plugin-proposal-private-property-in-object version is not meant to be imported. Something is importing #1030

Closed evgenii-code closed 1 year ago

evgenii-code commented 1 year ago

Version

create-nuxt-app: v5.0.0

Steps to reproduce

node v16.17.1 npm 8.15.0 link to the package.json

  1. run:

    npx create-nuxt-app foo
  2. Select prompted options

    ? Project name: foo
    ? Programming language: TypeScript
    ? Package manager: Npm
    ? UI framework: None
    ? Template engine: HTML
    ? Nuxt.js modules: Axios - Promise based HTTP client, Progressive Web App (PWA)
    ? Linting tools: ESLint, Prettier
    ? Testing framework: None
    ? Rendering mode: Universal (SSR / SSG)
    ? Deployment target: Server (Node.js hosting)
    ? Development tools: (Press <space> to select, <a> to toggle all, <i> to invert selection)
    ? Continuous integration: None
    ? Version control system: Git
  3. run:

    cd foo
    npm run dev

What is Expected?

Start of the dev server

What is actually happening?

Server crashes with an error:

 ERROR  Failed to compile with 1 errors                                                                  friendly-errors 13:13:19  

 ERROR  in ./.nuxt/client.js                                                                  friendly-errors 13:13:19  

Module build failed (from ./node_modules/babel-loader/lib/index.js):                                                                  friendly-errors 13:13:19
Error: [BABEL] C:\work\foo\.nuxt\client.js: --- PLACEHOLDER PACKAGE ---
This @babel/plugin-proposal-private-property-in-object version is not meant to
be imported. Something is importing
@babel/plugin-proposal-private-property-in-object without declaring it in its
dependencies (or devDependencies) in the package.json file.
Add "@babel/plugin-proposal-private-property-in-object" to your devDependencies
to work around this error. This will make this message go away.

Full text of the error

if i add @babel/plugin-proposal-private-property-in-object to dev dependencies, then nothing happens.

Error appears on different PCs, win 11, or ubuntu

danielroe commented 1 year ago

Fix in progress at https://github.com/nuxt/nuxt/pull/21488

danielroe commented 1 year ago

This should be resolved in the edge channel shortly (using nuxt-edge), or in the next release (2.17) which we plan for this weekend.

Let me know if not and I'll reopen.