Could not resolve dependency: react@"^15.0.0 || ^16.0.0" from react-google-maps@9.4.5
See original GitHub issueHello, 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: test_project@0.0.2
Found: react@17.0.2
node_modules/react
react@"^17.0.2" from the root project
Could not resolve dependency:
peer react@"^15.0.0 || ^16.0.0" from react-google-maps@9.4.5
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
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Could not resolve dependency error peer react@"^16.8.0
this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Read more >could not resolve dependency peer react@ ^16.0.0 - You.com
Found: react@16.0.0 npm ERR! node_modules/react npm ERR! react@"16.0.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer ......
Read more >How to Fix npm ERR ERESOLVE Unable to Resolve ...
Command:- npm config set legacy-peer-deps trueIn This Video We Will See How to Fix npm ERR ERESOLVE Unable to Resolve Dependency Tree ...
Read more >How to solve peer dependencies error after updating ... - Reddit
I regularly update dependencies using npm i -g npm-check-updates & then doing ncu -u which ... Could not resolve dependency: npm ERR! peer ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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 Our Slack channel: https://join.slack.com/t/react-google-maps-api/shared_invite/enQtODc5ODU1NTY5MzQ4LTBiNTYzZmY1YmVjYzJhZThkMGU0YzUwZjJkNGJmYjk4YjQyYjZhMDk2YThlZGEzNDc0M2RhNjBmMWE4ZTJiMjQ
Enjoy!
@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.