-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Failed to resolve entry for package "@maplibre/maplibre-gl-directions". The package may have incorrect main/module/exports specified in its package.json. #246
Comments
Hi, @chanmathew! Would be really helpful to see at least some minimal reproduction here. |
Hi @smellyshovel - here you go. I'm installing as npm package: You can see as soon as I add the import from the lib it breaks the app, if you remove the import the app loads fine again. |
From what I can see, it's really an issue with plugin's settings. In short (and if I'm not mistaken), I'm using a set of package.json's fields which are compatible with earlier versions of Vite, but the newer ones need some other set of fields. I'll try to fix that ASAP and will let you know when a new version is available. Thanks for letting me know and creating a repro! |
…the relevant declarations to the top of the file)
@chanmathew I created a PR as an attempt to fix the issue. It may not work though. And, in short, even though I have another way to try to fix it, this other way would require a lot of work to do. So, meanwhile the PR is being reviewed and a new version is being released, you can try the following fix (in
Please, tell me if this works for you (but try it locally, not on StackBlitz, as it's not clear how they handle dependency paths there). |
Hi there,
I'm trying to install this library in a Sveltekit project, and I'm getting the following errors:
Error: Failed to resolve entry for package "@maplibre/maplibre-gl-directions". The package may have incorrect main/module/exports specified in its package.json.
Here are my relevant packages:
Not sure what the issue is exactly 🤔
The text was updated successfully, but these errors were encountered: