1

I tried to go to the @testing-library/react folder in node modules and change all the react versions to the same as the current one, which is 18.2.0, although knowing that the react versions are different. I'm aware that there are a few more folders with incompatible tree dependencies, but I think it has to do with the react-typed package.

 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!   react@"^18.2.0" from the root project

 npm ERR!   peer react@"^18.0.0" from @testing-library/[email protected]

 npm ERR!   node_modules/@testing-library/react

 npm ERR!     @testing-library/react@"^13.4.0" from the root project

 npm ERR!   3 more (react-dom, react-icons, react-scripts)

 npm ERR! 

 npm ERR! Could not resolve dependency:

npm ERR! peer react@"^16.3.0" from [email protected]

 npm ERR! node_modules/react-typed

 npm ERR!   react-typed@"^1.2.0" from the root project

 npm ERR! 

 npm ERR! Conflicting peer dependency: [email protected]

 npm ERR! node_modules/react

 npm ERR!   peer react@"^16.3.0" from [email protected]

 npm ERR!   node_modules/react-typed

 npm ERR!     react-typed@"^1.2.0" 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 /vercel/.npm/eresolve-report.txt for a full report.
 
 npm ERR! A complete log of this run can be found in:

 npm ERR!     /vercel/.npm/_logs/2022-12-13T14_24_46_461Z-debug-0.log
 Error: Command "npm install" exited with 1

changing the dependency-peers inside the moduls when installed the react-typed I use

--legacy-peer-deps

as well and still gives me those errors now when I try tyo deploy it. All this time it didn't give me this error while doing the project...

2
  • Hi @AshdodyBoy, could you please improve the question by including the error log in text form, not as image, to help the community help you. Commented Dec 13, 2022 at 9:10
  • Hi @IngoSteinke, sorry about that. Just updated the question! Commented Dec 13, 2022 at 14:29

1 Answer 1

2

This error comes from version 7.x of npm.

Please try again with the --legacy-peer-deps option.

$ npm install --save react-typed --legacy-peer-deps

OR try to downgrade npm v6:

npm install -g npm@6
Sign up to request clarification or add additional context in comments.

1 Comment

It worked! First I've done the second command first and then the first and it worked. Thanks plenty Adem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.