Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku does not update node.js > package.json Github tarball dependecies

I am managing a dependency at Github which I use as a dependency in my project. I placed the dependecy as a tarball link (viz. https://github.com/username/dependecy/tarball/master) into the package.json and it is working fine as expected locally. When I update the package at Github I can run a npm install and all dependencies including the Github tarballs get updated. However it is not the case at Heroku. tarball-linked dependencies does not get updated. Any ideas?

like image 991
pars Avatar asked Jan 02 '12 13:01

pars


People also ask

Does Heroku install Dev dependencies?

By default, Heroku will install all dependencies listed in package. json under dependencies and devDependencies . After running the installation and build steps Heroku will strip out the packages declared under devDependencies before deploying the application.

How do I install Heroku dependencies?

Run the npm install command in your local app directory to install the dependencies that you declared in your package. json file. Start your app locally using the heroku local command, which is installed as part of the Heroku CLI. Your app should now be running on http://localhost:5000/.

Does Heroku run npm build?

By default, Heroku runs npm start while starting deployed Node.

What is Package lock json?

package.lock.json. It contains basic information about the project. It describes the exact tree that was generated to allow subsequent installs to have the identical tree. It is mandatory for every project. It is automatically generated for those operations where npm modifies either node_modules tree or package.


1 Answers

I had the similar problem. My App had the dependency with caret versioning like this:

"dependency": "^0.6",

So every time the dependency got its patch version updated, I wanted Heroku to have the updated dependency without any commits/pushes to my App. For that I set just in case

heroku config:set NODE_MODULES_CACHE=false

And when the new patch version became available I did the manual redeploy of the same App that was already deployed from Heroku Dashboard. enter image description here Can you try to do the same for your case? Possibly this will help you.

like image 124
vogdb Avatar answered Sep 29 '22 22:09

vogdb