visgl / loaders.gl

Loaders for big data visualization. Website:
https://loaders.gl
Other
714 stars 195 forks source link

Missing dependencies in package.json #2918

Closed juandjara closed 8 months ago

juandjara commented 8 months ago

Hello team.

I'm building an application with deck.gl and installing the latest version (9.0.0-beta.9) with npm took me to a bug here

Captura de pantalla 2024-03-15 a las 12 51 27

Seems like those two modules (@loaders.gl/compression and @loaders.gl/crypto) are not listed as explicit dependencies in the package.json of @loaders.gl/3d-tiles

Can confirm that installing those two packages in the root package.json of my project that uses deck.gl removes the bug in the screenshot above.

Thank you for your time

donmccurdy commented 8 months ago

I wrote a script to scan the repository for imports of missing or transitive dependencies in modules. It found a fair number, listed below.

I'll work on a PR to correct that, but – are these by any chance intended? I'm aware that npm and yarn can resolve transitive dependencies, but I can reproduce the error @juandjara is hitting above, so it doesn't seem that they are resolving the transitive dependencies in this case. I'm not sure what could be happening, and why it's happening now (specifically) in the context of the deckgl v9 beta.

status pkg missing dependencies
@loaders.gl/3d-tiles @loaders.gl/images, @loaders.gl/crypto, @loaders.gl/compression, @math.gl/culling
@loaders.gl/arrow @loaders.gl/worker-utils
@loaders.gl/bson
@loaders.gl/compression
@loaders.gl/core @loaders.gl/schema
@loaders.gl/crypto
@loaders.gl/csv
@loaders.gl/draco
@loaders.gl/excel
@loaders.gl/flatgeobuf @loaders.gl/schema, @repeaterjs/repeater, geojson, flatbuffers, jsts, slice-source
@loaders.gl/geopackage @loaders.gl/loader-utils
@loaders.gl/geotiff @loaders.gl/loader-utils
@loaders.gl/gis
@loaders.gl/gltf @loaders.gl/schema
@loaders.gl/i3s @loaders.gl/polyfills, @loaders.gl/math, @loaders.gl/zip
@loaders.gl/images
@loaders.gl/json
@loaders.gl/kml
@loaders.gl/las
@loaders.gl/lerc
@loaders.gl/loader-utils @loaders.gl/schema, pmtiles
@loaders.gl/math
@loaders.gl/mvt
@loaders.gl/netcdf
@loaders.gl/obj
@loaders.gl/parquet
@loaders.gl/pcd
@loaders.gl/ply
@loaders.gl/pmtiles
@loaders.gl/polyfills
@loaders.gl/potree
@loaders.gl/schema geojson, apache-arrow
@loaders.gl/shapefile
@loaders.gl/terrain
@loaders.gl/textures @math.gl/types
@loaders.gl/tile-converter @loaders.gl/compression, @loaders.gl/math
@loaders.gl/tiles
@loaders.gl/video
@loaders.gl/wkt @loaders.gl/gis
@loaders.gl/wms
@loaders.gl/worker-utils
@loaders.gl/xml
@loaders.gl/zarr
@loaders.gl/zip
donmccurdy commented 8 months ago

Possibly also a yellow flag ...

https://github.com/visgl/loaders.gl/blob/8bafe81bc462141aab10509ac768ad7617f2f51a/modules/3d-tiles/package.json#L52-L62

... with peerDependencies set like this, perhaps for certain project setups, npm resolves a mix of v4.2 and v4.1 dependencies.

donmccurdy commented 8 months ago

PR:

donmccurdy commented 8 months ago

For the DeckGL v9 release, we've switched back to (stable) LoadersGL v4.1. I believe the issues were related to using an alpha release of LoadersGL, and that alone may fix them. For LoadersGL v4.2, and future alpha releases, #2919 should resolve the missing dependencies.