Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

421
Vistas
Unable to install or update packages for React project

I've been working on my react project and am unable to update or install new packages without my computer making a ton of noise. I know it has something to do with the versions of react-dom and react-router-dom but I am not sure the best way to fix it. I just don't want to screw anything up further. Any help or guidance is appreciated!

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: my-app@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   peer react@"*" from @testing-library/react@11.2.7
npm WARN   node_modules/@testing-library/react
npm WARN     @testing-library/react@"^11.2.2" from the root project
npm WARN   5 more (mini-create-react-context, react-dom, react-router, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"17.0.2" from react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"*" from @testing-library/react@11.2.7
npm WARN   node_modules/@testing-library/react
npm WARN   1 more (the root project)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: my-app@0.1.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   peer react@"*" from @testing-library/react@11.2.7
npm WARN   node_modules/@testing-library/react
npm WARN     @testing-library/react@"^11.2.2" from the root project
npm WARN   5 more (mini-create-react-context, react-dom, react-router, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@">=15" from react-router-dom@5.3.0
npm WARN node_modules/react-router-dom
npm WARN   react-router-dom@"^5.2.0" from the root project

These errors popped up after deleting node_modules and package-lock.json.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: my-app@0.1.0
npm ERR! Found: react@undefined
npm ERR! node_modules/react
npm ERR!   react@"^17.1.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@">=15" from react-router-dom@5.3.0
npm ERR! node_modules/react-router-dom
npm ERR!   react-router-dom@"^5.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 /Users/cherie/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

To update all packages to a new major version, install the npm-check-updates package globally:

npm install -g npm-check-updates

then run it:

ncu -u

this will upgrade all the version hints in the package.json file, to dependencies and devDependencies, so npm can install the new major version.

then run this :

npm update

over 4 years ago · Santiago Trujillo Denunciar

0

The project has been setup using an older version of NodeJS and NPM, the package manager, so it was more lax about dependencies than the current version. When working with older projects, you can use a CLI flag:

npm install --legacy-peer-deps

Just like the error actually tells you. If that is not enough, and the project is just bad as far as dependencies go, you can also use the other flag it's proposing:

npm install --force

Both of those flags relax the dependency resolution checks to work more like older version of the package manager.

This way, you can at least install the project and then you can spent some time on maintenance to fix the issues with mismatched dependency versions and ranges.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda