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
-
bug priority: low role: BE stage: now
难度 2/5 1-3 小时 新手友好度 86/100
ahmadrosid/nakama#2594 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
milind-soni/OpenMausBot#6495 ·
维护者通常 1 天内回复
-
Navigating the session tree adds the branch's prompts to Up-arrow history again可能已有人在做 @acmerfight 今天认领。 未关闭untriaged
难度 2/5 1-3 小时 新手友好度 68/100
earendil-works/pi#12279 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
approved documentation
难度 1/5 1 小时以内 新手友好度 89/100
vitest-dev/vitest#12015 · 4 条评论 ·
维护者通常 1 天内回复