Use @googlemaps/js-api-loader as a peer dependency
@googlemaps/js-api-loader should be used as a peer dependency due to issues like this.
https://github.com/googlemaps/js-api-loader/issues/825
Using this as a dependency expands the blast radius of the dependencies of this package.
If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.
@cgarrovillo Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:
- Check the issue tracker - bugs and feature requests for Google Maps Platform APIs and SDKs
- Open a support case - Get 1:1 support in Cloud Console.
- Discord - chat with other developers
-
StackOverflow - use the
google-mapstag
This is an automated message, feel free to ignore.
@cgarrovillo Thanks. It works!
I don't think that would have helped much, and most of the time - when dependencies aren't broken - it would only make it more complicated to install this package.
What happened last week was a published version of @googlemaps/js-api-loader that was broken. That would have had mostly the same effect if it was installed as a peer-dependency instead of a transitive dependency.
The only thing you can do in such a situation is to pin the dependency to an older version, and that can be done for both peerDependencies as well as for transitive dependencies (by specifying a resolution for the package in the package.json).