Hi ,
We use the deploy previews, but the builds are failing without clearing the cache first (using the web UI).
Logs
Fortunately it’s a public repo, so I can share with you an example of how the logs look like:
https://app.netlify.com/sites/theatrejs-playground/deploys/623ddac44ac1220008157c12
The bug (probably affects all the public repos using yarn 2
or above with workspaces)
I raised an issue on GitHub where I described where I think the problem is in the build script: link
The fix for the bug
Since I have already seen the problem, I also submitted a PR with a fix: link
Our quickfix that doesn’t actually work
We wanted to avoid manually re-deploying the previews (with the cache being cleared beforehand), so we wanted to use a quickfix: we deleted the /opt/build/cache
directory after the build script has run successfully (inspired by this answer on the forum), which unfortunately does not seem to work (the problem is the same, see an example here). My suspicion is that maybe deleting the cache folder only prevents caching after a successful build and the new builds will use the last successfully saved cache, but I’m not sure…
Questions
I only have two questions:
- Can you help us to find a quick fix that works?
- Could you have a look at the PR and merge it if it solves the problem? I’m happy to work on it more if you give me feedback.
That’s all, I hope this issue can be resolved in the near future!