- 
                Notifications
    
You must be signed in to change notification settings  - Fork 3.7k
 
Closed
Labels
Description
The cesium node module does not work in Node 13 due to the upgrade to ES6 modules and a breaking change in Node. The error message looks something like:
Warning: require() of ES modules is not supported.
require() of /Users/tylerlindberg/repos/forks/gltf-pipeline/node_modules/cesium/index.js from /Users/tylerlindberg/repos/forks/gltf-pipeline/gulpfile.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/tylerlindberg/repos/forks/gltf-pipeline/node_modules/cesium/package.json.
We've seen this issue in obj2gltf and gltf-pipeline:
CesiumGS/gltf-pipeline#507
CesiumGS/obj2gltf#225
@mramato has some ideas for fixing this before the Jan 2 release.