I believe my build is failing because the cache directory path is wrong. It appears as though $NETLIFY_CACHE_DIR is no longer defined? I’m a Netlify noobie. I assumed this was set automatically by the Netlify build environment.
As a side-note, I have fixed the issue by manually creating an environment variable called NETLIFY_CACHE_DIR and setting its value to /opt/buildhome/cache. But this is actually beside the point. I’d like to understand what changed to cause my site build to fail.
Hi, @dbj, it looks like that environment variable stopped working in the build system. I don’t see that environment variable documented as a useable environment variable during the build process anywhere.
We do mention check the value of that variable in the source code for the build-image here:
But that documentation doesn’t say to use the variable in the running build system, it says to check the value in the source code itself.
Even when I check the version of that file prior to May 20th, the variable is defined but not exported:
To summarize, this variable isn’t documented as an environment variable and I’m not ever seeing it as an exported environment variable where it is defined. Nothing changed as far as I can see relating to that variable so I suspect that the change in behavior is related to something else.
Hey @dbj and @dillonkearns,
Our recommendation for custom cache handling is the cache utility of our build plugins (now out of beta and in GA ):
Do you want to take a look at this plugin, which will likely be available in our UI shortly and is already available on npm, and see if it will work for the Elm cache?