RAHUL KUMAR
RAHUL KUMAR

Reputation: 21

Heroku node app deployment failing

Deployment is failing from today that is 01-jan-2015 suddenly to heroku

+ git push [email protected]:sky-tickets-dev/skytickets-front.git stage
Everything up-to-date
+ git push -f [email protected]:skytickets-stage.git stage:master
Fetching repository, done.

-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
=====> Detected Framework: Node.js

       Node engine:         0.10.21
       Npm engine:          1.2.x
       Start mechanism:     Procfile
       node_modules source: prebuilt
       node_modules cached: true

       NPM_CONFIG_PRODUCTION=true
       NODE_MODULES_CACHE=true

       PRO TIP: Avoid checking node_modules into source control
       See https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-

-----> Installing binaries
       Downloading and installing node 0.10.21...
       Resolving npm version 1.2.x via semver.io...
       Downloading and installing npm 1.2.8000 (replacing version 1.3.11)...

-----> Building dependencies
       Rebuilding any native modules for this architecture

-----> Checking startup method
       Found Procfile

-----> Finalizing build
       Creating runtime environment
       Exporting binary paths
       Cleaning up build artifacts
       Caching node_modules for future builds
       Build successful!
       [email protected] /tmp/build_604cc19d81766dfe5375fc2195373f74
       ├── UNMET DEPENDENCY [email protected]
       ├── UNMET DEPENDENCY [email protected]
       ├── UNMET DEPENDENCY [email protected]
       ├── UNMET DEPENDENCY [email protected]

Upvotes: 2

Views: 772

Answers (1)

Felix Loether
Felix Loether

Reputation: 6208

I encountered the same issue today. We had some node modules checked in to Git and some that were installed using npm install during the push, and the problem was that heroku-buildpack-nodejs was recently updated to no longer support this. Now you need to commit to either having all of the modules checked in to Git or having none checked in - the latter being the preferable way.

Their README includes a way to hotfix this issue by using a previous version of heroku-buildpack-nodejs:

For most Node.js apps this buildpack should work just fine. If, however, you're unable to deploy using this new version of the buildpack, you can get your app working again by locking it to the previous version:

heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs#v63 -a my-app
git commit -am "empty" --allow-empty
git push heroku master

Then please open a support ticket at help.heroku.com so we can diagnose and get your app running on the default buildpack.

If you're using heroku-buildpack-multi as your buildpack (like me), you can instead add the "#v63" suffix to the buildpack URL in the .buildpacks file.

Upvotes: 1

Related Questions