Skip to content
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

Could not resolve dependency: react@"^15.0.0 || ^16.0.0" from [email protected] #1071

Open
porot07 opened this issue Apr 15, 2021 · 8 comments

Comments

@porot07
Copy link

porot07 commented Apr 15, 2021

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
}

@eddOrnelas
Copy link

Same problem, any update here?

@JustFly1984
Copy link

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

@eddOrnelas
Copy link

@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

@DarkAng3L
Copy link

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 :-?

@JustFly1984
Copy link

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

@mattvb91
Copy link

@JustFly1984 thank you for forking, appreciated!

@kristinabressler
Copy link

I have a React project that I build about 4 years ago. Now I'm trying to update my react project. However, I did encounter this error that's mentioned above. So how do I fix this error?

I tried npm uninstall react-google-maps but all I got was this:

➜  weather-app git:(master) ✗ npm uninstall react-google-maps
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from [email protected]
npm WARN   node_modules/mini-create-react-context
npm WARN     mini-create-react-context@"^0.3.0" from [email protected]
npm WARN     node_modules/react-router
npm WARN   10 more (react-dom, react-native-open-maps, react-router, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"15.5.4" from [email protected]
npm WARN node_modules/react-google-maps
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"15.5.4" from [email protected]
npm WARN   node_modules/react-google-maps
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react-dom
npm WARN   react-dom@"^16.12.0" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"15.5.4" from [email protected]
npm WARN node_modules/react-google-maps
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"15.5.4" from [email protected]
npm WARN   node_modules/react-google-maps
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from [email protected]
npm ERR!   node_modules/mini-create-react-context
npm ERR!     mini-create-react-context@"^0.3.0" from [email protected]
npm ERR!     node_modules/react-router
npm ERR!       react-router@"5.1.2" from [email protected]
npm ERR!       node_modules/react-router-dom
npm ERR!         react-router-dom@"^5.1.2" from the root project
npm ERR!   peer react@"^16.0.0" from [email protected]
npm ERR!   node_modules/react-dom
npm ERR!     react-dom@"^16.12.0" from the root project
npm ERR!   9 more (react-native-open-maps, react-router, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"18.2.0" from [email protected]
npm ERR! node_modules/react-native
npm ERR!   peer react-native@">0.45.0" from [email protected]
npm ERR!   node_modules/react-native-open-maps
npm ERR!     react-native-open-maps@"^0.3.4" from the root project
npm ERR!   peer react-native@"*" from @react-native/[email protected]
npm ERR!   node_modules/react-native/node_modules/@react-native/virtualized-lists
npm ERR!     @react-native/virtualized-lists@"^0.72.8" from [email protected]
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"18.2.0" from [email protected]
npm ERR!   node_modules/react-native
npm ERR!     peer react-native@">0.45.0" from [email protected]
npm ERR!     node_modules/react-native-open-maps
npm ERR!       react-native-open-maps@"^0.3.4" from the root project
npm ERR!     peer react-native@"*" from @react-native/[email protected]
npm ERR!     node_modules/react-native/node_modules/@react-native/virtualized-lists
npm ERR!       @react-native/virtualized-lists@"^0.72.8" from [email protected]
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

What steps do I need to take to resolve those errors and update all the old packages?

@ayoubkhan558
Copy link

any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants