nuxt: Fresh create nuxt app not starting properly on Windows 10
Environment
Nuxt CLI v3.0.0-27234123.a896c64
OS: Windows 10 Build 19043
Node: 14.17.0
Npm: 6.14.8
Describe the bug and expected behavior
When running npm run dev -o, it builds properly and starts for a second, but then the console fills with the following messages
> Local: http://localhost:3000/
> Network: http://192.168.56.1:3000/
> Network: http://192.168.0.102:3000/
√ Generated nuxt.d.ts 17:12:10
i Vite warmed up in 1580ms 17:12:10
√ Vite server built in 1915ms 17:12:11
√ Vite server built in 55ms 17:12:11
√ Nitro built in 304 ms 17:12:11
√ Vite server built in 32ms 17:12:11
√ Vite server built in 27ms 17:12:11
√ Vite server built in 60ms 17:12:11
√ Vite server built in 75ms 17:12:12
√ Vite server built in 29ms
Server Side Rendering Error: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:782:11)
at Loader.resolve (internal/modules/esm/loader.js:88:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:241:28)
at Loader.import (internal/modules/esm/loader.js:176:28)
at importModuleDynamically (internal/modules/esm/translators.js:114:35)
at exports.importModuleDynamicallyCallback (internal/process/esm_loader.js:30:14)
at $id_60f0615f (file:///C:/Users/X/Desktop/projects/nuxt3-app/.nuxt/dist/server/server.mjs:84:185)
at __instantiateModule__ (file:///C:/Users/X/Desktop/projects/nuxt3-app/.nuxt/dist/server/server.mjs:1798:9)
at __ssrLoadModule__ (file:///C:/Users/X/Desktop/projects/nuxt3-app/.nuxt/dist/server/server.mjs:1746:25)
at ssrImport (file:///C:/Users/X/Desktop/projects/nuxt3-app/.nuxt/dist/server/server.mjs:1770:13) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
The Vite server build in XXX is getting called recursively and doesnt stop.
Steps to reproduce
- npx nuxi init nuxt3-app
- code -r nuxt3-app
- npm install
- npm run dev -o
Additional context
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 18
- Comments: 23 (10 by maintainers)
Commits related to this issue
- fix(vite): normalize paths before comparing (#763) Co-Authored-By: Anthony Fu <hi@antfu.me> — committed to nuxt/framework by pi0 3 years ago
This seems a vite issue. In the meantime, you can use webpack@5 by adding this
nuxt.config.ts:Windows 10. Same issue here. Clean install.
From Discord it is reported to be the same issue with Linux.
Sure, here you go:
I got a new error after retrying (I updated in between):
EDIT: I should add that the welcome page worked, except for a bit of CSS
I’m still having this issue late in 2022. Will it not be resolved?
Aside from console spam, it works for me on windows (just spam)
Sure thing, wasnt sure if it was related
Hi @pi0 I removed the nodes_modules and yarn.lock but still not working. Here is the
npx nuxi inforesult :Thanks but even with the hotfix it is still not working for me on Windows 10. Getting the same error. Vite build loop is fixed though.
Awesome! Thanks for confirming. Let’s track the webpack issue (https://github.com/nuxt/nuxt.js/issues/11891) in another issue 😃