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

Aperta
#970 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@harlan-zw ci sta già lavorando.

Dal 26/10/2026.

  • #971 di @harlan-zw — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
node.js, nuxt, typescript
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
587
Fork
99
Merge medio
1g 7h
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nuxt/scripts

Tutte le issue di nuxt/scripts

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.