mhemanthkmr
mhemanthkmr

Reputation: 71

How can I reslove npm ERR

I am trying to install react-reveal but I got an error in npm.

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@">=16.8.0" from @emotion/[email protected]
npm ERR!   node_modules/@emotion/react
npm ERR!     @emotion/react@"^11.10.0" from the root project
npm ERR!     peer @emotion/react@"^11.0.0-rc.0" from @emotion/[email protected]
npm ERR!     node_modules/@emotion/styled
npm ERR!       @emotion/styled@"^11.10.0" from the root project
npm ERR!       3 more (@mui/material, @mui/styled-engine, @mui/system)
npm ERR!     3 more (@mui/material, @mui/styled-engine, @mui/system)
npm ERR!   16 more (@emotion/styled, @mui/base, @mui/icons-material, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.3.0 || ^16.0.0" from [email protected]
npm ERR! node_modules/react-reveal
npm ERR!   react-reveal@"^1.2.2" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"^15.3.0 || ^16.0.0" from [email protected]
npm ERR!   node_modules/react-reveal
npm ERR!     react-reveal@"^1.2.2" 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 /root/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-08-19T15_56_05_390Z-debug-0.log

> [email protected] start
> react-scripts start

/tmp/start-5d9fb3cc.sh: line 1: react-scripts: not found

I trying to start my react script but I have this kind of error

I installed react-reveal after this error occurring like this

Kindly Help Guys

Thanks in Advance

Upvotes: 0

Views: 548

Answers (1)

Aya Abdessalem
Aya Abdessalem

Reputation: 154

React-Reveal is basically deprecated at this point. It did not get any updates for years. In its package.json it declares a dependency to react 15 - 16, you are using react 18 and node >= 16.

you can run npm i react-reveal --legacy-peer-deps (as it tells you ) to have npm somewhat ignore this error, or try to force install by running npm i react-reveal --force , but it MIGHT lead to issues.

Upvotes: 1

Related Questions