Heroku Buildpack for Node.js
This is the official Heroku buildpack for Node.js apps.
For more information about using this Node.js buildpack on Heroku, see these Dev Center articles:
For more general information about buildpacks on Heroku:
Locking to a buildpack version
In production, you may want to lock dependencies - including buildpacks - to a specific version.
First, find the version you want from
the list of buildpack versions.
Then, specify that version with
heroku buildpacks:set https://github.com/heroku/heroku-buildpack-nodejs#v170 -a my-app
If you have trouble upgrading to the latest version of the buildpack, please open a support ticket at help.heroku.com so we can assist.
Chain Node with multiple buildpacks
This buildpack automatically exports node, npm, and any node_modules binaries
$PATH for easy use in subsequent buildpacks.
Having trouble? Dig it? Feature request?
For local development, you may need the following tools:
Deploying an app with a fork or branch
To make changes to this buildpack, fork it on GitHub. Push up changes to your fork, then create a new Heroku app to test it, or configure an existing app to use your buildpack:
# Create a new Heroku app that uses your buildpack heroku create --buildpack <your-github-url> # Configure an existing Heroku app to use your buildpack heroku buildpacks:set <your-github-url> # You can also use a git branch! heroku buildpacks:set <your-github-url>#your-branch
In order to download the latest plugins that have been released, run the following:
Make sure the version is in the format
The buildpack tests use Docker to simulate Heroku's stacks.
To run the test suite:
Or to just test a specific stack:
make heroku-16 make heroku-18 make heroku-20
The tests are run via the vendored shunit2 test framework.