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

131
Views
Next.js suddenly not importing any packages

After writing some seemingly irrelevant code, my project has stopped working altogether and I am getting "Cannot find package" errors for seemingly every package.

For example, this error I am getting after the code was working fine:

error - Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'react-hook-form' imported from /Users/~/dev/podcast/.next/server/pages/create.js
Did you mean to import react-hook-form-virtual-91dc5e5cb0/0/cache/react-hook-form-npm-7.22.1-0f35fbb533-52e0187503.zip/node_modules/react-hook-form/dist/index.cjs.js?

I have tried removing my node_modules and yarn.lock then reinstalling with yarn install to no avail.

My guess is that I may have broken something in my package.json or other configuration files since now it is suggesting to import from node_modules instead?

Node v16.13.0 React v17.0.2 Yarn v3.1.1

about 4 years ago · Juan Pablo Isaza
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!