I use the following buildpack: heroku-buildpack-nodejs
And by default, it should cache and restore node_modules
.
yarn.lock
file is located at the root of the application along with package.json
.
I've also added "cacheDirectories": [".cache/yarn"]
to package.json
During the review-app build log analysis, I see:
-----> Restoring cache
Loading 1 from cacheDirectories (package.json):
- .cache/yarn (not cached - skipping)
...
-----> Installing dependencies
Installing node modules (yarn.lock)
...
-----> Caching build
- node_modules
Seems like this issue was opened on Dec 20, 2016 : https://github.com/heroku/heroku-buildpack-nodejs/issues/359
How can I achieve the caching mechanism without installing the dependencies on every build?