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

Offen
#970 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@harlan-zw arbeitet bereits daran.

Seit 26.10.2026.

  • #971 von @harlan-zw — offen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
node.js, nuxt, typescript
Bereich
backend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug harlan-agent-ready-to-implement
🐛 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

Vorherrschende Sprache
TypeScript
Sterne
587
Forks
99
Ø Merge
1 T. 7 Std.
Gemergte PRs (30 T.)
5

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus nuxt/scripts

Alle Issues in nuxt/scripts

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.