-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: sampleTerrain no longer works in NodeJS #9906
Comments
@bkuster I am able to reproduce this issue in CesiumJS 1.73 on Node 14 and 16. Which versions of CesiumJS and Node did you notice this regression in? |
@ebogo1 I just stumbled across this issue today using Node 12 and cesium 1.79 (but I would assume the regression is older) while updating my module to ESM. I could also reproduce it in Node 14 & 16 (using 1.79). To verify, I then created a new package with the above code and used the latest cesium from npm & Node 14. |
I don't believe there's a workaround without revisiting how we package CesiumJS for Node - this issue will happen with any file that happens to call |
Issue
sampleTerrainMostDetailed
no longer works. Error received:require is not defined
.Reasoning
require
is no longer defined within an ESM module.Reproducable
Fix/Workaround
Use deferred import statements, as can be seen in this commit: virtualcitySYSTEMS@25f59d6
The question is, if cesium can support this for all its platforms? If so, I'm happy to open a PR.
The text was updated successfully, but these errors were encountered: