skip to Main Content
npm run dev    

> [email protected] dev
> next dev

  ▲ Next.js 14.2.3
  - Local:        http://localhost:3000
  - Environments: .env.local

 ✓ Starting...
[Error: UNKNOWN: unknown error, readlink 'C:UsersHOneDriveDesktopMERN-MajorProjectdoctor-appointment-booking-web-app.nextstaticchunksmain-app.js'] {
  errno: -4094,
  code: 'UNKNOWN',
  syscall: 'readlink',
  path: 'C:\Users\H\OneDrive\Desktop\MERN-MajorProject\doctor-appointment-booking-web-app\.next\static\chunks\main-app.js'
}

HOW do i solve this error , i am working on a next js web app ??
[http://localhost:3000/](https://i.sstatic.net/XWe8nalc.png)

I have used Strapi API and was connectiing it to the web app .

2

Answers


  1. Looks like this issue was referenced prior 1.

    Assuming you have already tried npm build and npm update then npm run dev with no resolution:

    1. Stop any nodejs process for the project
    2. Close the code editor you are working in and reopen it
    3. Delete the .next folder in your project directory
    4. Run npm cache clear --force
    5. Close the code editor you are working in and reopen it
    6. run npm run dev

    Considering npm, npm cache clear is a alias for npm cache clean. "Cleaning" the cache folder consists of removing all data out of it. Note this is usually not necessary as npm’s cache is typically resistant to data corruption due to self healing.

    npm stores cache data in directory within the configured cache typically named _cacache. This will manage local key and content address caches. Due to its ability for concurrency; running the subcommand of --force is required for clean to run 7.24.2 (legacy) and up.

    If this does not work it could potentially be antivirus killing your dev server on http://localhost:3000. Ensure your server is running with a exception added to your firewall.

    References:

    2

    Login or Signup to reply.
    • Install latest Node Version

    • Fresh Install Next.JS

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search