Invalid dependencies?

Wanted to reach out to the team and report this. May be better to submit an issue in Github and I can do that as well if needed.

I recently updated to Cesium 1.145.0 in a branch but noticed a regression in our application. I adjusted my project’s package.json to target 1.144.0 again, removed all node_modules, and re-ran npm install to ensure everything was clean. When I did, I was getting errors from Vite though because Cesium has @cesium/engine: "^26.2.0"which allows it to pull what it considers compatible versions, including minor and patch versions. In this instance, it was pulling 26.3.0 which throws the following errors.

✘ [ERROR] No matching export in “node_modules/@cesium/engine/index.js” for import “_shadersPolygonSignedDistanceFS”

node_modules/cesium/Source/Cesium.js:482:9:
  482 │ export { _shadersPolygonSignedDistanceFS } from '@cesium/engine';
      ╵          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

✘ [ERROR] No matching export in “node_modules/@cesium/engine/index.js” for import “_shadersclipPolygons”

node_modules/cesium/Source/Cesium.js:1204:9:
  1204 │ export { _shadersclipPolygons } from '@cesium/engine';
       ╵          ~~~~~~~~~~~~~~~~~~~~

✘ [ERROR] No matching export in “node_modules/@cesium/engine/index.js” for import “_shadersunpackClippingExtents”

node_modules/cesium/Source/Cesium.js:1268:9:
  1268 │ export { _shadersunpackClippingExtents } from '@cesium/engine';
       ╵          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/Users/dferguson/dev/raid/node_modules/esbuild/lib/main.js:1467
let error = new Error(text);
^

Error: Build failed with 3 errors:
node_modules/cesium/Source/Cesium.js:482:9: ERROR: No matching export in “node_modules/@cesium/engine/index.js” for import “_shadersPolygonSignedDistanceFS”
node_modules/cesium/Source/Cesium.js:1204:9: ERROR: No matching export in “node_modules/@cesium/engine/index.js” for import “_shadersclipPolygons”
node_modules/cesium/Source/Cesium.js:1268:9: ERROR: No matching export in “node_modules/@cesium/engine/index.js” for import “_shadersunpackClippingExtents”
at failureErrorWithLog (/Users/dferguson/dev/raid/node_modules/esbuild/lib/main.js:1467:15)
at /Users/dferguson/dev/raid/node_modules/esbuild/lib/main.js:926:25
at /Users/dferguson/dev/raid/node_modules/esbuild/lib/main.js:1345:9
at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
errors: [Getter/Setter],
warnings: [Getter/Setter]
}

Should these versions be marked with a ~ instead of a ^ so that it only allows patch updates?

Hey David,

Thanks for the report, and for the thorough diagnosis. This looks like it’s already been reported in #11834, where the ^ ranges on @cesium/engine / @cesium/widgets are the culprit. Someone hit the same _shaders* errors there a couple of weeks ago.

Might be worth adding a comment there with your repro (Vite/esbuild, hitting it on the 1.145.0 / engine 26.3.0 bump), since the case already on file was webpack.

In the meantime, you’ve probably already done this or similar, an overrides block pinning @cesium/engine and @cesium/widgets to the versions listed in node_modules/cesium/package.json should sort it out.