App Platform NodeJS Buildpack

NodeJS

heroku-buildpack-nodejs is utilized as the buildpack for detecting and building your NodeJS applications.

You can view the README for a full list of configuration options available to the buildpack.

Detection

A NodeJS app is detected based on the existence of the following file at the root of your source code:

package.json

Customization

Node Version

You can customize the Node version used by specifying the version in the engines section of your package.json:

{
  "engines": {
    "node": "14.x"
  }
}

NPM

You can customize the NPM version used by specifying the version in the engines section of your package.json:

{
  "engines": {
    "npm": "~1.0.20"
  }
}

Yarn

You can customize the Yarn version used by specifying the version in the engines section of your package.json:

{
  "engines": {
    "yarn": "^0.14.0"
  }
}

Limitations

  • Both the NPM and Yarn package managers are supported, however, either package-lock.json for NPM projects or yarn.lock for Yarn projects must be committed to the repo alongside the app’s source code.