nuxt / create-nuxt-app

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

npm run dev doesn't work on new nuxt project #950

Closed Gbr22 closed 2 years ago

Gbr22 commented 2 years ago

Version

create-nuxt-app: v4.0.0

Steps to reproduce

Create a project, then run npm run dev in the project folder

gabor@DESKTOP-VNKHLP1  /c/Users/gabor/source/repos
$ npx create-nuxt-app dime-website

create-nuxt-app v4.0.0
✨  Generating Nuxt.js project in dime-website
? Project name: dime-website
? Programming language: JavaScript
? Package manager: Npm
? UI framework: None
? Nuxt.js modules: (Press <space> to select, <a> to toggle all, <i> to invert selection)
? Linting tools: (Press <space> to select, <a> to toggle all, <i> to invert selection)
? Testing framework: None
? Rendering mode: Universal (SSR / SSG)
? Deployment target: Static (Static/Jamstack hosting)
? Development tools: (Press <space> to select, <a> to toggle all, <i> to invert selection)
? What is your GitHub username? gbr22
? Version control system: Git
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated

🎉  Successfully created project dime-website

  To get started:

        cd dime-website
        npm run dev

  To build & start for production:

        cd dime-website
        npm run build
        npm run start

gabor@DESKTOP-VNKHLP1  /c/Users/gabor/source/repos
$ cd dime-website

gabor@DESKTOP-VNKHLP1  /c/Users/gabor/source/repos/dime-website
$ npm run dev

> dime-website@1.0.0 dev
> nuxt

 WARN  Address localhost:3000 is already in use.                                                              20:19:00

i Trying a random port...                                                                                     20:19:00

   ╭────────────────────────────────────────╮
   │                                        │
   │   Nuxt @ v2.15.8                       │
   │                                        │
   │   ▸ Environment: development           │
   │   ▸ Rendering:   server-side           │
   │   ▸ Target:      static                │
   │                                        │
   │   Listening: http://localhost:56025/   │
   │                                        │
   ╰────────────────────────────────────────╯

i Preparing project for development                                                                           20:19:02
i Initial build may take a while                                                                              20:19:02
i Discovered Components: .nuxt/components/readme.md                                                           20:19:02
√ Builder initialized                                                                                         20:19:02
√ Nuxt files generated                                                                                        20:19:03

 ERROR  Plugin not found: C:\Users\gabor\source\repos\dime-website\.nuxt\components\plugin.js                 20:19:03

  at node_modules\@nuxt\builder\dist\builder.js:740:15
  at async Promise.all (index 0)
  at async Builder.build (node_modules\@nuxt\builder\dist\builder.js:324:5)
  at async Object._buildDev (node_modules\@nuxt\cli\dist\cli-dev.js:107:5)
  at async Object.startDev (node_modules\@nuxt\cli\dist\cli-dev.js:65:7)
  at async Object.run (node_modules\@nuxt\cli\dist\cli-dev.js:52:5)
  at async NuxtCommand.run (node_modules\@nuxt\cli\dist\cli-index.js:413:7)

What is Expected?

That the project works development mode

What is actually happening?

A "Plugin not found" error occures.

MygengBin commented 2 years ago

949 This have you answer.

Gbr22 commented 2 years ago

Running npm i --save glob@7.2.0 solved my problem, thanks https://github.com/nuxt/nuxt.js/issues/10440#issuecomment-1126714019