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?
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.
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/.
By default, Heroku runs npm start while starting deployed Node.
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.
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. Can you try to do the same for your case? Possibly this will help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With