ERR_UNSUPPORTED_ESM_URL_SCHEME
See original GitHub issueEnvironment
$ npx nuxi info
npm WARN config global --global
, --local
are deprecated. Use --location=global
instead.
Nuxt CLI v3.0.0-rc.6
RootDir: C:\DATA\Work
Nuxt project info:
- Operating System:
Windows_NT
- Node Version:
v16.16.0
- Nuxt Version:
3.0.0-rc.6
- Package Manager:
yarn@1.22.19
- Builder:
vite
- User Config:
ssr
,app
,typescript
,vite
,modules
,build
,css
,i18n
,image
,server
- Runtime Modules:
vite-plugin-vue-type-imports/nuxt
,@nuxtjs/tailwindcss@5.3.1
,@nuxtjs/i18n@8.0.0-alpha.0-27644818.4f1d945
,@vueuse/nuxt@8.9.4
,@nuxt/image-edge@1.0.0-27628766.3629b9a
- Build Modules:
-
Reproduction
Local environment on Windows 11 Github repo - https://github.com/molotow11/nuxt3-windows-issue
Describe the bug
When I run yarn dev
, build is fine and urls shown, then when go to the site, this stuck on Nuxt loading and the following error in the backend console:
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
at new NodeError (node:internal/errors:372:5)
at throwIfUnsupportedURLScheme (node:internal/modules/esm/resolve:1120:11)
at defaultResolve (node:internal/modules/esm/resolve:1200:3)
at ESMLoader.resolve (node:internal/modules/esm/loader:580:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:80:40)
at link (node:internal/modules/esm/module_job:78:36) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
It is already checked with npx nuxi upgrade --force
and still the same error.
Additional context
package.json:
{
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"lint": "eslint . --ext .ts,.vue,.js",
"prettier:format": "prettier --write ."
},
"devDependencies": {
"@nuxt/image-edge": "^1.0.0-27628766.3629b9a",
"@nuxtjs/eslint-config-typescript": "^10.0.0",
"@nuxtjs/i18n": "yarn:@nuxtjs/i18n-edge",
"@nuxtjs/tailwindcss": "^5.1.3",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"@vue/eslint-config-prettier": "^7.0.0",
"autoprefixer": "^10.4.7",
"eslint": "^8.17.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-nuxt": "^3.2.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^9.1.0",
"postcss": "^8.4.14",
"prettier": "^2.6.2",
"typescript": "^4.7.3",
"vite-plugin-vue-type-imports": "^0.2.0",
"vue": "^3.2.37",
"vue-eslint-parser": "^9.0.3",
"vue3-carousel": "^0.1.40"
},
"dependencies": {
"@vueuse/core": "^8.7.5",
"@vueuse/nuxt": "^8.7.5",
"ipx": "^0.9.10",
"nuxt": "3.0.0-rc.6",
"remove": "^0.1.5",
"vite-plugin-eslint": "^1.6.1"
},
"engines": {
"node": "16.x"
}
}
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file ...
ERROR Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths ...
Read more >ERR_UNSUPPORTED_ESM_U...
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be ...
Read more >Lab 7.1 ERR_UNSUPPORTED_ESM_URL_SCHEME
When execting npm test in Lab 7.1 on WIndows 11 with Node v16.14.0 installed I get the following error:
Read more >Only file and data URLs are supported by the default ESM ...
Coding example for the question Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader - Vue 3-Vue.js.
Read more >Running PostCSS - ESM loader Error - support - HUGO
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. Received protocol 'node:' at Loader.
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 FreeTop 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
Top GitHub Comments
@danielroe Ok, great!
"nuxt": "3.0.0-rc.8",
in package.jsonyarn install
andyarn dev
Cannot start nuxt: nuxtCtx.tryUse is not a function
"@nuxt/kit": "3.0.0-rc.8",
yarn install
It is working fine now! Thanks so much!
@danielroe Ok, description updated. Minimal repo - https://github.com/molotow11/nuxt3-windows-issue