- 
                Notifications
    
You must be signed in to change notification settings  - Fork 3.7k
 
Closed
Description
With the current main state (i.e this state as of the time of writing this), the steps of
- cloning the repo
 - running 
npm install - running 
npm run build 
cause an error on Windows systems.
The error message is
> [email protected] build
> gulp build
[16:39:41] Using gulpfile C:\cesium\gulpfile.js
[16:39:41] Starting 'build'...
  Build\CesiumUnminified\index.js       9.5mb
  Build\CesiumUnminified\index.js.map  18.5mb
Done in 348ms
  Build\CesiumUnminified\Cesium.js      13.1mb
  Build\CesiumUnminified\Cesium.js.map  21.7mb
Done in 457ms
  Build\CesiumUnminified\index.cjs       9.6mb
  Build\CesiumUnminified\index.cjs.map  18.5mb
Done in 332ms
[16:39:46] 'build' errored after 4.39 s
[16:39:46] 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 'c:'
    at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:227:11)
    at defaultLoad (node:internal/modules/esm/load:109:3)
    at ModuleLoader.load (node:internal/modules/esm/loader:666:12)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:479:43)
    at #createModuleJob (node:internal/modules/esm/loader:503:36)
    at #getJobFromResolveResult (node:internal/modules/esm/loader:274:34)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:242:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:542:25)
The error message (with the "Received protocol 'c:'" part) indicates that a file path is used at a place where a URL is required. This basically means that a call to pathToFileURL is missing.
The stack trace and error message give zero indication about what is wrong, but given some recent hiccups with this, I tried it out, and the message also appears when just running npm run build-sandcastle, so maybe #12874 did not fix the actual issue (or not everywhere).
Metadata
Metadata
Assignees
Labels
No labels