Cannot start nuxt: Only URLs with a scheme in: file and data are supported by the default ESM loader

huangapple go评论40阅读模式
英文:

Cannot start nuxt: Only URLs with a scheme in: file and data are supported by the default ESM loader

问题

清理了缓存,删除并安装了依赖项。

英文:

When i remove some packages in my Project , and cleaned the Cache , and rm -rf the Node Modules
Installed new Dependencies and Nuxt, then appear this error.

How to fix it ?

 Cannot start nuxt:  Only URLs with a scheme in: file and data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'd:'

  at new NodeError (node:internal/errors:399:5)
  at throwIfUnsupportedURLScheme (node:internal/modules/esm/resolve:1059:11)                                                                  13:59:57  
  at defaultResolve (node:internal/modules/esm/resolve:1135:3)
  at nextResolve (node:internal/modules/esm/loader:163:28)
  at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
  at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
  at ESMLoader.import (node:internal/modules/esm/loader:525:22)
  at importModuleDynamically (node:internal/modules/esm/translators:110:35)
  at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14)
  at loadBuilder (/D:/IAICB-72/IAICB-71/node_modules/nuxt3/dist/index.mjs:2966:5)

Cleaned the Cache , rmoved and installed the Dependencies

答案1

得分: 1

同样的问题。我逐个注释掉已安装的nuxt模块,发现是@nuxtjs/robots模块为我创建了这个错误。

英文:

Same issue. I comment one by one the nuxt module installed to find out it's the @nuxtjs/robots modules who create the bug for me.

huangapple
  • 本文由 发表于 2023年5月7日 20:05:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76193820.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定