Running UnDocs on Windows fails to start Nuxt
JakeIsMeh opened this issue · comments
Environment
Node 20.7.0
npm 10.1.0
pnpm 8.15.1
undocs@0.2.17
Windows 11 23H2
Reproduction
Attempt to start/build an undocs project on Windows.
Describe the bug
Nuxt will fail to load, error-ring out. It seems that Windows isn't handled yet in the CLI/Loader.
Additional context
No response
Logs
>pnpm run dev --verbose
> @ dev D:\GitCode\nitro\docs
> undocs dev "--verbose"
Nuxt 3.10.3 with Nitro 2.9.1
➜ Local: http://localhost:4000/
➜ Network: use --host to expose
[1:00:24 am] ERROR Cannot start nuxt: 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 'd:'
at new NodeError (node:internal/errors:405:5)
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:216:11)
at defaultLoad (node:internal/modules/esm/load:118:3)
at ModuleLoader.load (node:internal/modules/esm/loader:388:13)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:270:56)
at new ModuleJob (node:internal/modules/esm/module_job:65:26)
at #createModuleJob (node:internal/modules/esm/loader:282:17)
at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:240:34)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:221:17)
at async ModuleLoader.import (node:internal/modules/esm/loader:307:23)
I sadly cannot easily run undocs on windows or continuously test it. if you have found obvious fixes, PR is more than welcome otherwise I recommend you to use WSL2.
(closing for now as is low priority)
@JakeIsMeh @pi0
You need to use bun 🙈