Skip to content

The 'yarnPath' could not be read from the 'yarnrc.yml' file #1223

Open
@davidwessman

Description

@davidwessman

Describe the bug
When installing yarn with yarn set version berry you get Yarn 4.1.1.
This does not generate a .yarnrc.yaml so we get no yarnPath.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the guide on https://devcenter.heroku.com/articles/migrating-from-yarn-classic
  2. No .yarnrc.yml is generated anymore and there is no yarnPath set, because it uses Yarn 4 (https://devcenter.heroku.com/changelog-items/2714 which is supported?)
  3. Deploy to Heroku
  4. Error
-----> Build failed
 !     The 'yarnPath' could not be read from the 'yarnrc.yml' file
      It looks like 'yarnrc.yml' is missing the 'yarnPath' value, which is needed
      to identify the location of yarn for this build.
      To regenerate 'yarnrc.yml' with the 'yarnPath' value set, make sure Yarn 2
      is installed on your local machine and set the version in your project
      directory with:
       $ yarn set version berry
      Read more at the Yarn docs: https://yarnpkg.com/getting-started/install#per-project-install
      
       https://devcenter.heroku.com/articles/nodejs-support
 !     Push rejected, failed to compile Node.js app.
 !     Push failed

Versions (please complete the following information):

  • Heroku Stack: [e.g. heroku-22]
  • Node Version: [e.g. 20.x]
  • NPM or Yarn Version: [e.g. Yarn 4.1.1]
  • Buildpack Version: [e.g. heroku/nodejs]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions