Why is my Node.js build failing because of no matching Yarn versions?


Heroku recommends specifying the exact version of Yarn that you are using locally in the engines field. To find your version locally:

$ yarn --version

Use the engines section of your package.json to specify the version of Yarn to use on Heroku:

  "name": "myapp",
  "description": "a really cool app",
  "version": "1.0.0",
  "engines": {
    "node": "6.11.1",
    "yarn": "0.27.5"

You can also specify a semver range by using x as placeholders like: 0.27.x.

You can see a list of all published Yarn versions here: https://nodebin.herokai.com/v1/yarn/linux-x64.txt or by running the command:

yarn info yarn versions

Yarn versions before 0.16.0

Early in Yarn's development there were a number of releases that were not published to npm that Heroku does not support. If you are running an older version of Yarn then we highly recommend upgrading. You will see faster installs and fewer bugs.