ol-cesium
ol-cesium copied to clipboard
No default export
I used to use
import OLCesium from 'ol-cesium';
This works fine in 2.15.0, but in 2.15.1 and 2.15.2 angular complains that there's no default export.
Am I doing something wrong? Is the import supposed to be done differently or did something break?
Hi @Christoph142 , I can reproduce your import error with plain javascript. We are planning to rework the build system and publish only standard ES6 modules. In the meantime could you stay with 2.15.0?
Thanks for checking this out. I already pinned down 2.15.0 for the time being and I'm keeping an eye on this here.
See https://github.com/openlayers/ol-cesium/discussions/1096.
ES6 modules, exported types and updated build system sounds great!
@Christoph142 could you please share a working usage example on Stackblitz or similar? Would love to see your package.json and how you import and use ol-cesium 2.15.x in Angular. I have had to pin olcs 2.14.0 and cesium 1.105.2 since newer versions of either yields various errors (related to layers, overlays and vector-projections) from the Angular component that toggles 2D/3D-map. Sorry for hijacking thread, I'm asking for sort of the same end result though.
@ccondrup the trick is installing ol-cesium npm package. olcs doesn't work.
I bumped into the same issue and tried going with 2.15.0 to no avail :
./node_modules/cesium/Source/Cesium.js:795:0-62 - Error: export 'parseBoundingVolumeSemantics' (reexported as 'parseBoundingVolumeSemantics') was not found in '@cesium/engine' (possible exports: AlphaMode, AlphaPipelineStage, Appearance, ApproximateTerrainHeights, [...], updateVersion, usesExtension, webGLConstantToGlslType, wrapFunction, writeTextToCanvas)
I also tried setting up a stackblitz in order to reproduce the issue but it runs into another compile issue (just uncomment line 12 in main.ts for it to occur) :
Error in /turbo_modules/[email protected]/index.cjs (10:18) Module /turbo_modules/[email protected]/Build/CesiumUnminified/index.cjs not declared as a System.registerDynamic dependency of https://angular-14-demo-pjm6dp.stackblitz.io/turbo_modules/[email protected]/index.cjs