heroku npm install not updating because of cache

Wasted a frustrating hour trying to figure out why `npm install` and `npm install foobar` would not update my package.

Finally found this:


Their caching is very rigid. Even if `npm install` runs and it tells you the package is updated, it won’t update. The cache will just replace itself. Even deleting the entire node_modules directory via `heroku run bash` did not work

heroku config:set NODE_MODULES_CACHE=false
$ git commit -am ‘disable node_modules cache’ –allow-empty
$ git push heroku master

Running the above finally did the trick.