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

348
Views
Next.js is not recognizing '@types/react'

When I try to run my Next.js app with npm run dev I get an error message saying that I don't have the required packages to run Next with Typescript:

Please install @types/react by running:

        npm install --save-dev @types/react

If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files in your pages directory).

However, the module '@types/react' is installed. I tried running npm install --save-dev @types/react and got no error messages (just a bunch of warnings but I don't think they are the problem).

How can I solve this and run the project?

about 4 years ago · Santiago Gelvez
2 answers
Answer question

0

Seems like there is a bug in the current @types/react version (specifically v18.0.2), you can downgrade to 18.0.1 with npm install --save-dev @types/react@18.0.1

Source: https://github.com/vercel/next.js/issues/36085

about 4 years ago · Santiago Gelvez Report

0

I used yarn add -D @types/react@18.0.1 and it worked perfectly! Netsu is right, seems like there is a bug in the current @types/react version (specifically v18.0.2).

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!