[Bug] Home config interaction w/ Yarn 1
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- node.js, typescript
Research direction
Start by reproducing the setup with a home and project .yarnrc.yml containing different yarnPath values, then run yarn --version from the project. Trace Yarn's configuration resolution to determine why the home file wins; done means the closest project configuration takes precedence and the reported version is 2.3.1.
Written by the indexing model from the issue text.
Description
Describe the user story
If I have:
~/.yarnrc.yml(home directory Yarnrc file) withyarnPathpointing to e.g. v1.22.10~/project/.yarnrc.yml(project-level Yarnrc file) withyarnPathpointing to e.g. v2.3.1
Then cd ~/project && yarn --version should yield version 2.3.1, not 1.22.10.
Describe the solution you'd like
Respect the closest Yarnrc file – it should have higher priority / take precedence over my global config.
Describe the drawbacks of your solution
Not sure if home directory's Yarnrc file isn't special somehow. Maybe some people depend on the current behavior?
Describe alternatives you've considered
N/A
Additional context
This was a major gotcha for one of my colleagues today, hard to debug. We were not sure why Yarn "misbehaves" when everything seemed correct. It turned out that there was a yarnPath in the home directory and that has overwritten our project setup.
- Dominant language
- TypeScript
- Stars
- 8.1k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yarnpkg/berry
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·