Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
維護者通常 1 天內回覆
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 55/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- node.js, nuxt, typescript
- 領域
- backend
研究方向
Start by reproducing the failure on Windows with the linked Nuxt project and inspect the nuxt prepare postinstall path mentioned in the report. Trace where the ESM loader receives a drive-letter path and identify the relevant tests; done means the reported commands complete without this protocol error on Windows.
由索引模型根據 Issue 內容生成。
描述
🐛 The bug
When I try to use the 2.0 beta version on windows, Any command i try to run npm run dev npm install etc returns this error. I know the issue is caused by this extension. Even empty new projects start to error when nuxt scripts is installed
npm notice run postinstall
npm notice run nuxt prepare
ERROR Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:193:11)
at defaultLoadSync (node:internal/modules/esm/load:146:3)
at #loadAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:809:12)
at #loadSync (node:internal/modules/esm/loader:841:53)
at ModuleLoader.load (node:internal/modules/esm/loader:790:26)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:501:31)
at #getOrCreateModuleJobAfterResolve (node:internal/modules/esm/loader:567:36)
at afterResolve (node:internal/modules/esm/loader:614:52)
at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:620:12)
at node:internal/modules/esm/loader:639:32
npm error code 1
npm error path C:\Users\\Desktop\here
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c nuxt prepare
npm error A complete log of this run can be found in: C:\Users\\AppData\Local\npm-cache\_logs\2026-10-26T15_26_47_901Z-debug-0.log
🛠️ To reproduce
🌈 Expected behavior
No section in the docs for this
ℹ️ Additional context
No response
- 主要語言
- TypeScript
- 星號
- 587
- 分支
- 99
- 平均合併
- 1 天 7 小時
- 30 天內合併 PR
- 5
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
nuxt/scripts 的其他 Issue
-
Nuxt Modules Readme not found可能已有人在做 @harlan-zw 於 1 天前認領。 未關閉bug harlan-agent-ready-to-implement
難度 3/5 半天 新手友好度 40/100
維護者通常 1 天內回覆
-
harlan-agent-ready-to-spec
難度 5/5 一週以上 新手友好度 25/100
維護者通常 1 天內回覆
-
harlan-agent-wait-to-implement
難度 3/5 1-2 天 新手友好度 58/100
維護者通常 1 天內回覆
-
Loading 3rd party scripts for unused widget可能重新可做 關聯的 PR 已關閉且未合併。 未關閉harlan-agent-wait-to-implement
難度 4/5 3-5 天 新手友好度 55/100
維護者通常 1 天內回覆
-
harlan-agent-wait-to-implement
難度 5/5 一週以上 新手友好度 25/100
nuxt/scripts#881 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
相似的 Issue
-
approved check:passed streams:remove
難度 1/5 1 小時以內 新手友好度 62/100
維護者通常 1 天內回覆
-
Monthly Not a priority
難度 2/5 1-3 小時 新手友好度 66/100
Expensify/App#107229 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
GitTools/actions#2297 · 1 個 reaction ·
維護者通常 1 天內回覆
-
bug
難度 1/5 1 小時以內 新手友好度 88/100
hiero-ledger/hiero-sdk-js#4793 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
microsoft/vscode-cosmosdb#3594 · 1 則留言 ·
維護者通常 1 天內回覆