question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot install with react 17

See original GitHub issue
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!   peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.11.3
npm ERR!   node_modules/@material-ui/core
npm ERR!     @material-ui/core@"^4.11.3" from the root project
npm ERR!     peer @material-ui/core@"^4.9.11" from react-material-ui-carousel@2.2.2
npm ERR!     node_modules/react-material-ui-carousel
npm ERR!       react-material-ui-carousel@"*" from the root project
npm ERR!     1 more (@material-ui/icons)
npm ERR!   2 more (react-dom, @material-ui/icons)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.13.1" from react-material-ui-carousel@2.2.2
npm ERR! node_modules/react-material-ui-carousel
npm ERR!   react-material-ui-carousel@"*" from the root project

My deps versions:

    "@material-ui/core": "^4.11.3",
    "@material-ui/icons": "^4.11.2",
    "@material-ui/lab": "*",
    "@material-ui/system": "^4.11.3",
    "@testing-library/jest-dom": "^5.11.4",
    "@testing-library/react": "^11.1.0",
    "@testing-library/user-event": "^12.1.10",
    "react": "^17.0.2",
    "react-router-dom": "^5.2.0",

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Learuscommented, Apr 9, 2021

Looking a bit into it, and after updating the library’s peerDependencies to react 17, I would propose deleting your package-lock.json and node_modules folder and trying again. If that does not resolve the issue try to use yarn and yarn install as it doesn’t have any issues at the time of writing. Happy coding.

0reactions
Velomastercommented, Apr 9, 2021

It worked! Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't install on React 17 create-react-app project · Issue #1420
Hi, As the title says, npm won't install react-vis on a create-react-app project with React 17. Here's the console error log: npm ERR!...
Read more >
React v17.0 – React Blog
No New Features. The React 17 release is unusual because it doesn't add any new developer-facing features. Instead, this release is primarily ...
Read more >
cant install react-leaflet on my react project - Stack Overflow
Running into an issue here where I cant install ...
Read more >
Troubleshooting | React Navigation
Sometimes it might even be due to a corrupt installation. If clearing cache didn't work, try deleting your node_modules folder and run npm...
Read more >
React Testing Library - npm
npm install --save-dev @testing-library/react ... If you cannot upgrade to React DOM 16.9, you may suppress the warnings by adding the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found