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] does not recognize `preferDeferredVersions` in .yarnrc.yml

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

Describe the bug

yarn 2.0.0-rc.31 does not recognize preferDeferredVersions in a .yarnrc.yml even though it is mentioned in the docs: https://yarnpkg.com/configuration/yarnrc#preferDeferredVersions

It logs YN0034: Invalid configuration key "preferDeferredVersions" in /path/to/.yarnrc.yml

To Reproduce

const {promises: {readFile, writeFile}} = require(`fs`);

await packageJsonAndInstall({
  devDependencies: {}
});

expect(await yarn('config', 'set', 'preferDeferredVersions', 'true')).not.toContain(`Couldn't find a configuration`);

Environment if relevant (please complete the following information):

  • OS: Ubuntu 18.04.4 LTS (in WSL2)
  • Node version 13.3.0
  • Yarn version 2.0.0-rc.31

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cspotcodecommented, Mar 31, 2020

Oh yeah, that fixed it, thanks!

What threw me off, is the .yarnrc.yml docs page mixes core options with plugin options. Not sure if there’s a good way to make the difference clearer. https://yarnpkg.com/configuration/yarnrc#preferDeferredVersions

0reactions
paul-soporancommented, Apr 1, 2020

The Configuration pages will be greatly improved - eventually. I’ll make sure that we make the difference clearer.

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 >
How do I get yarn 2 to work in my project? - Stack Overflow
You have .yarnrc or .yarnrc.yml file in your home directory or in some of the parent folders Yarn 1 finds it and Yarn...
Read more >
yarn | Verdaccio
Yarn modern does not recognize --registry or .npmrc file anymore. For defining a registry you must use the .yarnrc.yml located in the root ......
Read more >
Strange build error with yarn add - beginner - ReScript Forum
I'm stuck in a very strange error that completely prevents me from building a rescript react application. Why or how this error happens...
Read more >
Yarn publish does not work (#121668) · Issues - GitLab
yarnrc.yml and if you added something to the package.json? I have recently migrated to yarn 2 but I am still getting an authentication...
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