Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

620
Views
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 answers
Answer question

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 Report

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!