Error in middleware-manifest.json (errno: -4094, code: 'UNKNOWN', syscall: 'readlink') in .Next file

833 views Asked by At

My project was running fine when, with a small change in the code, npm run dev stopped working, and the terminal showed the following message:

[Error: UNKNOWN: unknown error, readlink 'C:\\Users\\username\\OneDrive\\Desktop\\Stuff\\web-project\\.next\\server\\middleware-manifest.json] 
{errno: -4094,  code: 'UNKNOWN',  
syscall: 'readlink',  
path: 'C:\\Users\\username\\OneDrive\\Desktop\\Stuff\\web-project\\.next\\server\\middleware-manifest.json'}

I undid the small change (it was some text I was adding), but that didn't fix anything. I checked the file path and the permissions, and everything is correct.

1

There are 1 answers

1
Alejandra Santos On

I solved it, I asked You.com and it said to try and delete the .Next file, then rebuild for it to reappear. I deleted it and just ran with npm run dev, the .Next file appeared again and it no longer had the error.