fix: build on windows in CI
SgtPooki opened this issue · 3 comments
SgtPooki commented
see https://github.com/ipfs/ipfs-webui/actions/runs/7067401834/job/19240720367
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: 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:'
whizzzkid commented
Looks like a bunch of other things are failing as well: https://github.com/ipfs/ipfs-webui/actions/runs/7076694600
sumingcheng commented
I also encountered the same issue when launching the webui project on Windows. How should I solve it
> ipfs-webui@4.2.0 start:win32
> @powershell -Command $env:REACT_APP_GIT_REV=(git rev-parse --short HEAD); react-app-rewired-esm start
node:internal/errors:496
ErrorCaptureStackTrace(err);
^
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: 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:149:11)
at defaultLoad (node:internal/modules/esm/load:99:3)
at ModuleLoader.load (node:internal/modules/esm/loader:416:13)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:287:22)
at new ModuleJob (node:internal/modules/esm/module_job:63:26)
at #createModuleJob (node:internal/modules/esm/loader:311:17)
at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:264:34)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:250:17)
at async ModuleLoader.import (node:internal/modules/esm/loader:335:23) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
Node.js v18.19.0
SgtPooki commented
@sumingcheng not sure what the fix is just yet, but i'm going to start looking into this now