-
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
Package subpath './package.json' is not defined by "exports" in /Users/xxx/my_repo/node_modules/cesium/package.json #8992
Comments
@rapha-opensource I would recommend you ask about this on https://community.cesium.com since no one on the Cesium team uses Svelte. Also, we use GitHub for confirmed bugs and feature tracking so it's always better to start there first anyway unless you are 100% sure of a bug.
If you find out more information that points to something Cesium is doing wrong, please let us know and we can re-open the issue. |
This is an issue on more than just Svelte, as many bundler plugins check for config in I recommend re-opening and I'll be happy to add a PR. |
Lots of tools need to But in the short term, I believe adding |
Many tools attempt to require.resolve package.json, and in the latest versions of node that is not possible if the package specifies exports. The solution is to simply add package.json to exports. Resolves CesiumGS#8992
This is Cesium installed via
npm
and integrated in aSvelte/Sapper
route.npm install cesium
/cesium
which will load a basic CesiumViewer
.npm run dev
The Svelte page
The error message
Workaround
Delete the
exports
field innode_modules/cesium/package.json
.Re-launch
npm run dev
.The text was updated successfully, but these errors were encountered: