-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sam build error: The process cannot access the file because it is being used by another process #4595
Comments
Hi @betimer thanks for reaching out! Trying to understand the cause here, can I confirm with you that if you do not operate step 3 to rename, this issue does not occur? |
Hi @qingchm |
@betimer Thanks for the response, seems like this is an issue that occurred during the build process when we download dependencies, would you mind running the command with --debug flag on and paste in more detailed logs here for me to investigate? That would be greatly appreciated |
|
I get the same error as OP, but only 10% of the time it will happen. sam build
sam build
sam deploy I'm wondering if there's a really brief time a file is read by an editor or git or something, where a single retry or wait would fix. |
Initial thoughts on conflictsAt first I wondered if somehow aws-sam-cli has an issue if the cached dir But that didn't seem to make sense, because
Vs Code was okayI opened the directory I can collect other diagnostics if I know what to do. I wasn't sure if the true cause is actually Updated log with
|
@betimer Does yours error 100% of the time? Mine will fail sometimes, but never 100% of the time. Maybe that could be a useful clue. > sam build ....
# error
> sam build ...
# good
> sam deploy
# good |
@ninmonkey A work around I created a layer for prisma. |
@betimer Yes, I think it it is occurring in the sam cli. We are using different languages and get the same cli errors. Something I noticed across our logs:
Mitigations?
quoting your log
|
Describe the bug
To reproduce
Expected behavior
Success without any error (I have also tried to manually remove the temp file, but it turns out the error is consistent with each time it also generate again, so the root cause will be from
sam build
itself, and it generate the temp fileScreenshots
Your Environment
The text was updated successfully, but these errors were encountered: