[BUG] Install error for `"react": "^17.0.2"`
See original GitHub issueCould not install framer-motion
in a react project
"react": "^17.0.2",
"react-dom": "^17.0.2",
Install cmd npm i framer-motion
Error log
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: trading-ui@0.0.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.0.0" from framer-motion@7.2.0
npm ERR! node_modules/framer-motion
npm ERR! framer-motion@"*" from the root project
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.
npm ERR!
npm ERR! See C:\Users\NichitaPasecinic-JG\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\NichitaPasecinic-JG\AppData\Local\npm-cache\_logs\2022-08-22T08_44_28_713Z-debug-0.log
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6
Top Results From Across the Web
npm install fails with react 17.0.1 and react-native 0.64.0 #2603
I had this issue and nothing seemed to work. I fixed it by downgrading node to version 12.14.1 Uninstall the current node version...
Read more >Error when trying to install react-redux dependency
this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Read more >Error Boundaries - React
Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI...
Read more >React Testing Library - npm
Simple and complete React DOM testing utilities that encourage good testing practices.. Latest version: 13.4.0, last published: 4 months ago ...
Read more >Module not found: Can't resolve 'react-dom' error | bobbyhadz
To solve the error "Module not found: Error: Can't resolve 'react-dom'", make sure to install the react-dom package by opening your terminal in...
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 FreeTop 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
Top GitHub Comments
As per the upgrade guide and the error message, Framer Motion 7 uses React 18 as a minimum. If you can’t upgrade then you can use the latest version of 6.
Hey @mattgperry thanks mate. Problem solved. Much appreciated!