Frequent failures in 'preparing repo' stage

our deploy preview is failing frequently with this error:

Failed during stage 'preparing repo': exit status 1

it seems to work consistently when i do “clear cache and deploy site”, but it’s getting a bit painful because the build fails the first time most of the time. not sure what’s causing the failure, but is there a way to always trigger the build with “clear cache” option?

here is an example of how the failure looks like: https://app.netlify.com/sites/cilium-docs/deploys/5ecd46ea57048400072f4347

following up on this, i’m mainly interested in forcing clearing the cache at the beginning of the test until this issue is resolved. is there a directory i can rm -rf? i don’t mind using additional build minutes if it increases the reliability.

Hey @michi,

There’s no great way of clearing the cache however rm node_modules might get rid of the bulk of it?

thanks @Pieparkeri’ll try removing node_modules at the end of the build.