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

162
Vistas
Downgrade React v17 to v18 created using npx

How can I downgrade project created with "npx create-react-app . --template typescript". All posts I find online suggest manually changing dependencies then to run "npm install" but there's always some error when I do that. How can I modify dependencies to make it work with react v17 ?

here's my attempt to downgrade :

"dependencies": {
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.2.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.1",
"@types/node": "^16.11.36",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "5.0.1",
"typescript": "^4.6.4",
"web-vitals": "^2.1.4"

}

and here is errors:

npm WARN ERESOLVE overriding peer dependency

npm WARN While resolving: hard-keys-react17@0.1.0

npm WARN Found: react@18.1.0

npm WARN node_modules/react

npm WARN react@"^17.0.2" from the root project

npm WARN 3 more (@testing-library/react, react-dom, react-scripts)

npm WARN

npm WARN Could not resolve dependency:

npm WARN peer react@"^18.0.0" from @testing-library/react@13.2.0

npm WARN node_modules/@testing-library/react

npm WARN @testing-library/react@"^13.2.0" from the root project

npm WARN ERESOLVE overriding peer dependency

npm WARN While resolving: hard-keys-react17@0.1.0

npm WARN Found: react@18.1.0

npm WARN node_modules/react

npm WARN react@"^17.0.2" from the root project

npm WARN 3 more (@testing-library/react, react-dom, react-scripts)

npm WARN

npm WARN Could not resolve dependency:

npm WARN peer react@"^18.1.0" from react-dom@18.1.0

npm WARN node_modules/react-dom

npm WARN react-dom@"^17.0.2" from the root project

npm WARN 1 more (@testing-library/react)

npm WARN ERESOLVE overriding peer dependency

npm WARN While resolving: hard-keys-react17@0.1.0

npm WARN Found: react-dom@18.1.0

npm WARN node_modules/react-dom

npm WARN react-dom@"^17.0.2" from the root project

npm WARN 1 more (@testing-library/react)

npm WARN

npm WARN Could not resolve dependency:

npm WARN peer react-dom@"^18.0.0" from @testing-library/react@13.2.0

npm WARN node_modules/@testing-library/react

npm WARN @testing-library/react@"^13.2.0" from the root project

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You could always run

npm resolve dependencies

Manually downgrading might throw some warning tell you that there are newer version than the one you are using now but its still work all the same.

And you made a mistake in your package.json

"react-scripts": "5.0.1",

Make it

"react-scripts": "^5.0.1",
about 4 years ago · Juan Pablo Isaza 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