question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] `yarn set version berry` writes absolute (non-portable) path into .yarnrc.yml

See original GitHub issue
  • I’d be willing to implement a fix

Describe the bug

yarn set version berry writes a .yarnrc.yml with an absolute path for yarnPath. I assume this is a bug since the .yarnrc.yml and .yarn/releases are meant to be portable and local.

To Reproduce

I created a reproduction with Github Actions that can also be copy-pasted to run locally. https://github.com/cspotcode/repros/tree/yarnrc-absolute-yarnPath

Environment if relevant (please complete the following information):

  • OS: Ubuntu
  • Node version v12.15.0
  • Yarn version 2.0.0-rc.28

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:18
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
ghostcommented, Feb 20, 2020

Same –

  1. Per instructions, installed yarn 1.22 as global
  2. Ran yarn set version berry
    • this created .yarnrc.yml with the absolute path to .yarn/yarn-rc.yml
  3. Ran yarn set version berry
    • this set .yarnrc.yml with the relative path to .yarn/yarn-rc.yml

It seems like the work around is to run yarn set version berry twice in a row, until they update the global yarn install version.

2reactions
petterw03commented, Mar 6, 2020

A fix seems to have been merged into the 1.x repo: https://github.com/yarnpkg/yarn/pull/7931

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration options | Yarn - Package Manager
List of all the configuration option for Yarn (yarnrc files)
Read more >
Repository - GitLab
An error occurred while loading commit signatures ... yarn-berry.cjs ... prefer setting npmRegistryServer in your .yarnrc.yml file" ...
Read more >
Can't find module yarn-3.x.x.cjs (Yarn v3) - Stack Overflow
I set my yarn version (in yarnrc.yml) to the default yarn (I used homebrew) yarnPath ...
Read more >
Configuration.ts | searchcode
/packages/yarnpkg-core/sources/Configuration.ts ... accept actual paths must end with the "Filename" suffix 119// prefer to use absolute paths instead, ...
Read more >
.yarn/releases/yarn-2.2.2.cjs ...
Usage({description:"get the path to a binary script",details:"\n When used ... prefer setting npmRegistryServer in your .yarnrc.yml file" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found