Nuxt 3 - fresh install on Windows - cannot find module
See original GitHub issueEnvironment
Nuxt CLI v3.0.0-27243104.5e903ae 10:48:58 RootDir: c:\testing\nuxt3-app 10:49:00 Nuxt project info: 10:49:00
- Operating System:
Windows_NT
- Node Version:
v16.11.1
- Nuxt Version:
3.0.0-27243104.5e903ae
- Package Manager:
Yarn
- Bundler:
Vite
- User Config:
-
- Runtime Modules:
-
- Build Modules:
-
Describe the bug
Nuxt CLI reports it cannot find module, the web page is stuck on “Starting nuxt…” with NuxtJS logo and light/dark mode flashing background.
Reproduction
Followed the New project in docs.
npx nuxi init nuxt3-app
cd nuxt3-app
yarn install
yarn dev -o
(happens both with yarn and npm)
The directory of requested module, “nuxt3-app.nuxt\server”, doesn’t exist. I only see “server” directory inside “nuxt3-app.nuxt\dist\server”, but that one doesn’t have index.mjs
Logs
Nuxt CLI v3.0.0-27243104.5e903ae 10:52:05
10:52:05
> Local: http://localhost:3000/
> Network: http://172.24.96.1:3000/
> Network: http://172.18.48.1:3000/
> Network: http://192.168.56.1:3000/
> Network: http://192.168.86.79:3000/
i Vite warmed up in 685ms 10:52:08
√ Generated nuxt.d.ts 10:52:08
√ Vite server built in 956ms 10:52:09
√ Nitro built in 81 ms 10:52:09
WARN [worker] Cannot find module 'c:\testing\nuxt3-app\.nuxt\server\index.mjs' imported from c:\testing\nuxt3-app\.nuxt\nitro\index.mjs
at new NodeError (node:internal/errors:371:5)
at finalizeResolution (node:internal/modules/esm/resolve:416:11)
at moduleResolve (node:internal/modules/esm/resolve:932:10)
at Loader.defaultResolve [as _resolve] (node:internal/modules/esm/resolve:1044:11)
at Loader.resolve (node:internal/modules/esm/loader:89:40)
at Loader.getModuleJob (node:internal/modules/esm/loader:242:28)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:19 (5 by maintainers)
Top Results From Across the Web
Cannot find module '@nuxt/cli' - node.js - Stack Overflow
1 Answer 1 · npm install -g @vue/cli. If you want to create a new project with NUXT you need: · npx create-nuxt-app...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
To fix the error, you need to install the package that is absent in your project directory – npm install package-name or yarn...
Read more >Installation - Nuxt
Install Nuxt This command will add nuxt as a dependency to your project and add it to your package. json . The...
Read more >Get started with Vuetify
If you have not already created a new Vue.js project using Vue CLI, ... Vuetify can be added by installing the Nuxt Vuetify...
Read more >Install Nuxt.js on WSL - Windows - Microsoft Learn
Install Nuxt.js · Open a WSL command line (ie. · Create a new project folder: mkdir NuxtProjects and enter that directory: cd NuxtProjects...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s because it’s a fresh install using only the four commands specified above, with zero additional modifications.
But sure, I’ve pushed the folder as is into https://github.com/mnlj/nuxt3-1226.
+1 on Windows