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

621
Visualizações
Next.js TypeScript Error: You do not have the required packages installed

I am currently building out a basic nextjs website with the help of their handy typescript starter. Everything has been running smooth while developing using yarn dev until about 20 minutes ago, when I started randomly getting an error message any time I try to run yarn dev.

This is the error ouput:

It looks like you're trying to use TypeScript but do not have the required package(s) installed.

Please install @types/react by running:

        yarn add --dev @types/react

This just randomly started happening with no changes made to the codebase. I've tried wiping node_modules completely and reinstalling, and even tried cleaning the yarn cache. The dependency "@types/react": "^18.0.2" is included correctly in my package.json's devDependencies object, so I am totally clueless on how to fix this.

P.S. I found an existing issue posted about this here, but it is not related to my issue at all, as it pertains to Docker. All I am doing is running next.js locally on my laptop, it is not running in production anywhere.

about 4 years ago · Santiago Gelvez
3 Respostas
Responde à pergunta

0

This appears to be an issue with the @types/react package itself, which was just updated to 18.0.2 the morning that you ran into this problem. Rolling back to 18.0.1 appears to work.

Update: This is not an issue with @types/react 18.0.4 which is used in the current create-next-app as of yesterday. Just a short term annoyance.

about 4 years ago · Santiago Gelvez Relatório

0

I had the same problem. Solved by updating Next.js and React.

Updating next.js

npm install next@latest

Updating react version in the next.js app:

npm upgrade react@latest react-dom@latest

Source: https://www.codegrepper.com/code-examples/shell/how+to+update+next+js+version

about 4 years ago · Santiago Gelvez Relatório

0

The package create-next-app has been updated!

Use: npx create-next-app@latest my-app --typescript

This works for me now ;)

about 4 years ago · Santiago Gelvez 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