I am trying to reinstall an old project from react but am getting weird errors that I don't understand. I tried to change the version of react to newer but didn't work. I am currently using npm 8.11.0 and node v16.15.1 Using the command "npm log" I got this message. But I don't know how to fix the unmet dependencies if someone can help.
UPDATE: After downloading the yarn the new error is like this: But I don't know what i have to do with the link
CodePudding user response:
npm >= 7
has some breaking changes and it tries to install peerDependencies
automatically.
Try to run npm install
with npm version 6.x.x
or if you want to do it with npm version >= 7
then use a flag --legacy-peer-deps
like
npm install --legacy-peer-deps
CodePudding user response:
delete node_modules
install yarn package manager
and run yarn
. It should update all depenedencies to latest version. then yarn start
for running react-application