robots icon indicating copy to clipboard operation
robots copied to clipboard

Error "Only URLs with a scheme in: file, data are supported by the default ESM loader."

Open realandrew opened this issue 2 years ago • 2 comments

When I install the package (v3.0.0-1) and add @nuxtjs/robots to modules in nuxt.config.js (I'm using NuxtJS v3.0.0-rc.6) when loading the site it errors out with:

 ERROR  [worker reload] [worker init] Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'd:'                  18:48:05  

  at new NodeError (node:internal/errors:372:5)
  at throwIfUnsupportedURLScheme (node:internal/modules/esm/resolve:1120:11)
  at defaultResolve (node:internal/modules/esm/resolve:1200:3)
  at ESMLoader.resolve (node:internal/modules/esm/loader:580:30)
  at ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:18)
  at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:80:40)
  at link (node:internal/modules/esm/module_job:78:36)

this only happens with this module enabled so I'm pretty confident this is the cause. This is with no settings set for the module.

realandrew avatar Aug 07 '22 22:08 realandrew

I'm also having this issue too, Nuxt v3.0.0-rc.8 and it's definitely from this module

PikaDude avatar Sep 07 '22 14:09 PikaDude

I am having this issue too

maxtaube avatar Sep 22 '22 15:09 maxtaube

Same for me with "nuxt": "3.0.0-rc.13" and "@nuxtjs/robots": "^3.0.0-2", when i run npm run dev but no problem with build or generate

esaesa avatar Nov 11 '22 21:11 esaesa

This issue only occurs on Windows

P4sca1 avatar Nov 14 '22 20:11 P4sca1

I confirm that issue only occurs on Windows

50l3r avatar Nov 20 '22 11:11 50l3r

Not a problem with this module. See https://github.com/nuxt/framework/issues/9092

ricardogobbosouza avatar Nov 21 '22 21:11 ricardogobbosouza