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.

[BUG] Install error for `"react": "^17.0.2"`

See original GitHub issue

Could 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:closed
  • Created a year ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
mattgperrycommented, Aug 23, 2022

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.

0reactions
juanserna8commented, Aug 23, 2022

Hey @mattgperry thanks mate. Problem solved. Much appreciated!

Read more comments on GitHub >

github_iconTop 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 >

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