According to the official documentation, you should add several buildpacks to your installation, and not one multi-line package.
For example, if you want to deploy an application that uses the Nodejs package (i.e. grunt, gulp, etc.) to perform some configuration in your application, you should run this from the command line:
heroku buildpacks:add --index 1 heroku/nodejs
The add command adds the Nodejs collector as an optional buildpack, and does not replace your current buildpack. Pay attention to --index 1 . This indicates that Nodejs buildpack is the first in order to build packages. This is important because the final buildpack is the one used for the actual type of process. You can call heroku buildpacks from the command line to verify the installation of buildpack. I am running a Python application, so my heroku buildpacks looks like this:
=== your_app_name_here Buildpack URLs 1. heroku/nodejs 2. https://github.com/heroku/heroku-buildpack-python
Then, as indicated in the rocket, you can put it in your package.json file, which will be launched during deployment:
"scripts": { "postinstall": "./node_modules/.bin/gulp build" }
J-bob source share