Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
davidwessman opened this issue Mar 20, 2024 · 1 comment
Open

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

davidwessman opened this issue Mar 20, 2024 · 1 comment
Labels

Comments

@davidwessman
Copy link

davidwessman commented Mar 20, 2024

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]
@colincasey
Copy link
Contributor

Hi @davidwessman, thanks for filing this issue. This is a known issue with Yarn 4 and should be fixed by #1222.

For now it is possible to workaround this by forcing the Yarn release download and .yarnrc.yml configuration of yarnPath by running:

yarn set version berry --yarn-path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants