Error: While cloning /opt/render/project/src/npm-pkg/util-formatting/node_modules/ajv → /opt/render/project/src/apps/pods-web/node_modules/ajv ENOENT: no such file or directory, scandir '/opt/render/project/src/npm-pkg/util-formatting/node_modules/ajv’
I am able to deploy my app properly every time using Manual Deploy > Clear build cache and deploy.
However, whenever render auto deploys for me, the issue above pops up and the build fails.
Do you have any idea was the problem is or how to fix? Is there a setting that I can configure in render.yaml to just tell render to always clear build cache before deploying?
I am using yarn 3 so have SKIP_INSTALL_DEPS=true and am running a yarn install command instead as part of building. The issue may be related to this.
So we have multiple node modules in 3-4 directories to cache. Are there multiple env variables? How would we handle this?
Also, at least as a stopgap, how can I just programmatically turn off caching or checking the cache during the build so it stops erroring? Basically make it so the “clear build cache & deploy” option is run by default every time a deploy occurs / new commit is added to the branch render is listening to.
That way automated deployments will function and not be a blocker, and I can try to speed it up using caching separately.
Also - what does this command actually do?
While cloning /opt/render/project/src/npm-pkg/util-formatting/node_modules/ajv → /opt/render/project/src/apps/pods-web/node_modules/ajv ENOENT: no such file or directory, scandir ‘/opt/render/project/src/npm-pkg/util-formatting/node_modules/ajv’
The ajv dependency actually does exist at the root of the workspace and we can see that the cache is large - 881mb extracted. We’re using yarn workspaces so the dependencies should be hoisted and I confirmed that it does exist at root.