Race Condition on Windows while copying Edge Function Handlers #62394
Labels
bug
Issue was opened via the bug report template.
invalid link
The issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.
Output (export/standalone)
Related to the the output option in `next.config.js`.
Link to the code that reproduces this issue
gonna provide this in a couple minutes, let me write the issue first
To Reproduce
Fork the reproduction repository, and watch the Github action fail.
Current vs. Expected behavior
Currently, about 50% of times, it throws a
Resource busy or locked
exception.Instead, I expect the build to go through just fine.
Provide environment information
Which area(s) are affected? (Select all that apply)
Standalone mode (output: "standalone")
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
In
next.js/packages/next/src/build/utils.ts
Lines 1996 to 2026 in 905ee8e
copyFile
operations happening in parallel on the same file. Windows doesn't like that, and will throw anResource busy or locked
error.This can be prevented by ensuring files are only ever copied once, as seen a couple lines above:
next.js/packages/next/src/build/utils.ts
Lines 1972 to 1973 in 905ee8e
The text was updated successfully, but these errors were encountered: