Deploy previews randomly fail with non-zero exit code 2 in situations where I push new commits to an open Pull Request on Github.
Opening the Pull Request always successfully builds the deploy preview. But under certain conditions, pushing new commits to the Pull Request results in build errors that only have a generic exit code, so I can’t see where they’re breaking.
Manually clearing the cache and retrying resolves the issue, but I don’t want to have to do that every time.
Here is an example: Netlify App
This happens on two sites:
Both apps use pnpm with turborepo, so I’m wondering if this has something to do with turborepo wanting to use cached assets in a currently existing build?