next.js
next.js copied to clipboard
Rename failed after 496 retries when using --turbo
Link to the code that reproduces this issue
https://github.com/Arctomachine/turbopack-rename-not-permitted
To Reproduce
- Start dev server with --turbo flag and open home page to confirm everything is loaded, client functionality works
- Change code and hard refresh page
- Wait few minutes for error to appear in server logs
Current vs. Expected behavior
Expected: hot reload works, hard refresh works Current: hot reload not works, hard refresh not works. Gives following error instead:
[node.js fs] rename failed after 496 retries with error: Error: EPERM: operation not permitted, rename '...\.next\build-manifest.json.tmp.7rw4swsn0rb' -> ...\.next\build-manifest.json'
⨯ [Error: EPERM: operation not permitted, rename '...\.next\build-manifest.json.tmp.7rw4swsn0rb' -> '...\.next\build-manifest.json'] {
errno: -4048,
code: 'EPERM',
syscall: 'rename',
path: '...\\.next\\build-manifest.json.tmp.7rw4swsn0rb',
dest: '...\\.next\\build-manifest.json',
page: '/'
}
To update page with new contents need to stop server, delete .next folder, start server and hard refresh page.
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 20.10.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 14.1.1-canary.55 // Latest available version is detected (14.1.1-canary.55).
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Operating System (Windows, MacOS, Linux), Turbopack (--turbo)
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
First reported in #57581 (closed, locked) and supposedly fixed in #58835 (locked). However the introduced fix did not solve this problem, instead it only delays error output by significant time with same result.
Blame on antivirus mentioned in https://github.com/vercel/next.js/issues/57581#issuecomment-1824634169 does not seem credible.
- Malwarebytes, Comodo internet security, MS defender and operating system do not notify about any suspicious activity in real time and I found nothing related to my project or turbo in logs and blocked apps. If you know exactly what file to search for, I will check logs again and see if it is detected.
- Same code already runs with webpack without errors, which means the problem is exactly with turbopack itself or its implementation in next.