简体   繁体   中英

Dependency Tree Error while installing [react-top-loading-bar]

I am getting this type of error while installing the different packages using npm. I don't want to install those packages by doing --force or anything else. This is critical as it is I am in between development of my project. Does anyone help me to resolve this issue?

node --version - 16.16.0 npm --version - 8.11.0

npm ERR: code ERESOLVE npm ERR. ERESOLVE unable to resolve dependency tree npm ERR. npm ERR: While resolving. nims@0.1.0 npm ERR. Found: react@18.2.0 npm ERR! node_modules/react npm ERR! react@"^18.2.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16 || ^17" from react-top-loading-bar@2.1.0 npm ERR! node_modules/react-top-loading-bar

https://github.com/facebook/react/issues/25034

it occurs due to npm v7 and it can be solved by many ways but if you don't want to use --force or the other,just simply type this in to your terminal;

npm install -g npm@6

i hope it helps...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM