镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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:' #970

Open

Description

@metkm

🐛 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

https://github.com/metkm/here

🌈 Expected behavior

No section in the docs for this

ℹ️ Additional context

No response

Activity

  1. added
    harlan-agent-reviewApprove automated work for the current issue state or pull request head commit.
    harlan-agent-runningAn Agent holds a Task on this issue or pull request right now.
    and removed
    harlan-agent-reviewApprove automated work for the current issue state or pull request head commit.
    harlan-agent-runningAn Agent holds a Task on this issue or pull request right now.
    on Oct 26, 2026
  2. harlan-zw commented on Oct 26, 2026

    @harlan-zw
    Collaborator

    🤖 ISSUE TRIAGE

    Harlan Agent Kit posted this automated triage. It is not Harlan's personal assessment or commitment. AI open source policy.

    • Route: Ready to implement
    • Difficulty: 3/5
    • Impact: 4/5
    • Reproduction: Yes
    • Codebase review: Needed
    • Summary: The supplied reproduction enables only @nuxt/scripts beta.16 on Nuxt 4.6.2. Windows startup fails with an ESM path error. The failing import remains unidentified. No duplicate or matching active fix was verified. Confidence: 80/100; Windows
    • Next action: An implementation Agent should reproduce the Windows failure, trace the invalid drive-letter import, and fix the responsible loading boundary. Add a failing regression test first, then verify nuxt prepare and development startup on Windows and Linux.
  3. added
    harlan-agent-ready-to-implementIssue triage found bounded work ready for an implementation Agent.
    harlan-agent-runningAn Agent holds a Task on this issue or pull request right now.
    and removed
    harlan-agent-runningAn Agent holds a Task on this issue or pull request right now.
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingharlan-agent-ready-to-implementIssue triage found bounded work ready for an implementation Agent.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions