Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

158
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda