Hello, I tried install react-google-maps on my project and I got error:
# npm resolution error report
2021-04-15T09:36:08.537Z
While resolving: [email protected]
Found: [email protected]
node_modules/react
react@"^17.0.2" from the root project
Could not resolve dependency:
peer react@"^15.0.0 || ^16.0.0" from [email protected]
node_modules/react-google-maps
react-google-maps@"*" from the root project
Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
Raw JSON explanation object:
{
"code": "ERESOLVE",
"current": {
"name": "react",
"version": "17.0.2",
"location": "node_modules/react",
"dependents": [
{
"type": "prod",
"name": "react",
"spec": "^17.0.2",
}
]
},
"currentEdge": {
"type": "prod",
"name": "react",
"spec": "^17.0.2",
},
"edge": {
"type": "peer",
"name": "react",
"spec": "^15.0.0 || ^16.0.0",
"error": "INVALID",
"from": {
"name": "react-google-maps",
"version": "9.4.5",
"location": "node_modules/react-google-maps",
"dependents": [
{
"type": "prod",
"name": "react-google-maps",
"spec": "*",
}
]
}
},
"peerConflict": null,
"strictPeerDeps": false,
"force": false
}
Same problem, any update here?
@porot07 @eddOrnelas The repo of this project is unmaintained more than 3 years, and we had build new version https://www.npmjs.com/package/@react-google-maps/api
Supporting react 17 since version 2
We had rewrite it to TypeScript, and updating it frequently: https://github.com/JustFly1984/react-google-maps-api/tree/master/packages/react-google-maps-api
You can enjoy autocomplete.
You can see our docs: https://react-google-maps-api-docs.netlify.app
Also a lot of examples: https://react-google-maps-api-gatsby-demo.netlify.app/ https://github.com/JustFly1984/react-google-maps-api/tree/master/packages/react-google-maps-api-gatsby-example/src/examples
The bundle size is much smaller: https://bundlephobia.com/result?p=@react-google-maps/api
鈥∣ur Slack channel: https://join.slack.com/t/react-google-maps-api/shared_invite/enQtODc5ODU1NTY5MzQ4LTBiNTYzZmY1YmVjYzJhZThkMGU0YzUwZjJkNGJmYjk4YjQyYjZhMDk2YThlZGEzNDc0M2RhNjBmMWE4ZTJiMjQ
Enjoy!
@JustFly1984 yes i just found out and used the new version, sorry for asking updates before researching XD
a disclaimer/note can be useful in this case :P
Well since it is not maintained for more than 3+ years, it should be mentioned somewhere in https://www.npmjs.com/package/react-google-maps or https://github.com/tomchentw/react-google-maps docs that it is recommended to switch to https://www.npmjs.com/package/@react-google-maps/api :-?
@DarkAng3L Nobody has access to the repo. Possibly an author died or not interested in open source anymore, so there is no option to do what you want. In general it is a good practice to look how your dependencies maintained before using it in your project. There is almost always a better alternative.
I've posted to almost every issue for last 3 years.
@JustFly1984 thank you for forking, appreciated!
Most helpful comment
@porot07 @eddOrnelas The repo of this project is unmaintained more than 3 years, and we had build new version https://www.npmjs.com/package/@react-google-maps/api
Supporting react 17 since version 2
We had rewrite it to TypeScript, and updating it frequently: https://github.com/JustFly1984/react-google-maps-api/tree/master/packages/react-google-maps-api
You can enjoy autocomplete.
You can see our docs: https://react-google-maps-api-docs.netlify.app
Also a lot of examples: https://react-google-maps-api-gatsby-demo.netlify.app/ https://github.com/JustFly1984/react-google-maps-api/tree/master/packages/react-google-maps-api-gatsby-example/src/examples
The bundle size is much smaller: https://bundlephobia.com/result?p=@react-google-maps/api
鈥∣ur Slack channel: https://join.slack.com/t/react-google-maps-api/shared_invite/enQtODc5ODU1NTY5MzQ4LTBiNTYzZmY1YmVjYzJhZThkMGU0YzUwZjJkNGJmYjk4YjQyYjZhMDk2YThlZGEzNDc0M2RhNjBmMWE4ZTJiMjQ
Enjoy!