Failed to upload file: register copy

I am trying to deploy my site to Netlify, but I keep getting this error:

11:49:57 AM: 0 new files to upload
11:49:57 AM: 1 new functions to upload
11:52:17 AM: Failed to upload file: register copy
11:52:17 AM: Failing build: Failed to deploy site
11:52:17 AM: failed during stage 'deploying site': Failed to execute deploy: [PUT /deploys/{deploy_id}/functions/{name}][500] uploadDeployFunction default  &{Code:0 Message:}
11:52:17 AM: Finished processing build request in 4m59.280156647s

Everything seems to work fine locally with netlify dev and the production build seems to work fine too. It looks like I am only running into errors during deployment.

Any ideas what might be going on?

Thank you!

I was able to solve this. The line Failed to upload file: register copy is telling me that there is a file called register copy in my functions build folder. So I looked in there and there was a file called register copy. I don’t know how that happened, but I deleted my entire build folder, added all the build files and folders to my .gitignore file and redeployed my site. Everything is working now.

1 Like

Thanks so much for the followup, @samwell! This might help someone in the future who has a similar error so I am chuffed that you spelled it out for the next human (or hobbit) that walks this way :slight_smile: