React-google-maps: Could not resolve dependency: react@"^15.0.0 || ^16.0.0" from [email protected]

Created on 15 Apr 2021  路  6Comments  路  Source: tomchentw/react-google-maps

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
}

Most helpful comment

All 6 comments

Same problem, any update here?

@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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tahir-masood1 picture tahir-masood1  路  4Comments

shrimpy picture shrimpy  路  3Comments

EvHaus picture EvHaus  路  3Comments

farhan687 picture farhan687  路  3Comments

LukasZvikas picture LukasZvikas  路  3Comments