Build Error: ENOENT: no such file or directory, rename "..."
Unanswered
Russo-European Laika posted this in #help-forum
Russo-European LaikaOP
Keep getting this error when running
NextJS:
Node:
I have tried deleting
npm run build and also when pushing up changes to a branch on Vercel (fails when building):> Build error occurred
Error: ENOENT: no such file or directory, rename 'C:\Users\user\OneDrive\Documents\Code\Website\.next\export\500.html' -> 'C:\Users\user\OneDrive\Documents\Code\Website\.next\server\pages\500.html'NextJS:
14.1.0 (latest)Node:
21.6.1I have tried deleting
package-lock, node_modules, reinstalling Next, running npm cache verify, etc., but no luck. Any help much appreciated!8 Replies
Cornish Rex
I have the same error, and i dont use page router.
@Cornish Rex @Russo-European Laika
What you can use for your filenames is lowercase kebab case, so that this dosent happen
Cornish Rex
Hm but error is about page 500
Also i dont have any uppercase folder oraz file names.
Cornish Rex
Cornish Rex
This comment fix it https://github.com/vercel/next.js/issues/23128#issuecomment-801942293