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.

CONTRIBUTING mentions `yarn link`, which doesn't even exist anymore

See original GitHub issue

🐛 Bug Report

CONTRIBUTING.md tells us we can test the project by using yarn link. Unfortunately, yarn has been forced to a random commit of yarn 2, and yarn 2 doesn’t even have the yarn link (no-args) syntax:

faux@astoria:~/clone% yarn --version
1.22.10

faux@astoria:~/clone% cd jest
faux@astoria:~/clone/jest% yarn --version
2.3.3-git.20201026.e34bf6c6

faux@astoria:~/clone/jest% yarn link
Unknown Syntax Error: Not enough positional arguments.

$ yarn link [-A,--all] [-p,--private] [-r,--relative] <destination>

(Also, top tip to save anyone else an hour of debugging: this yarn version ignores your ~/.npmrc, you must rewrite it for them.)

If you use the yarn 2 syntax instead, you instead get a resolution error about @yarn/test-utils, which does indeed not exist in the registry, and apparently yarn isn’t smart enough to link it, either in --all mode or while trying to link just the cli (exactly the same output).

my-app% ~/clone/jest/.yarn/releases/yarn-sources.cjs link ~/clone/jest --all
➤ YN0000: ┌ Resolution step
➤ YN0001: │ Error: No candidate found for @jest/test-utils@npm:^26.0.0
    at ~/clone/jest/.yarn/releases/yarn-sources.cjs:2:335032
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
[...]

Expected behavior

Can someone who understands this yarn setup please update the CONTRIBUTING.md document with how to … run jest from git?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
SimenBcommented, Oct 30, 2020

yarn link sorta painful though as the yarn version is checked into this repo, so you need to launch the yarn from here but in the other CWD. Ditching the link instructions altogether seems easier?

0reactions
github-actions[bot]commented, May 11, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Questions & Answers | Yarn - Package Manager
The compatibility issues will still exist, they just will be against packages that used to work but that you don't test anymore. in...
Read more >
yarn install leads to Cannot find module yarn-berry.js
Even the yarn version command leads to this error and so does every other command using yarn. I can always use npm but...
Read more >
npm vs Yarn | What are the differences? - StackShare
Yarn installs without internet while NPM doesn't. ... by the yarn or yarn install command and also give you the license (as well...
Read more >
Why Are You Still Using Yarn in 2018? - I Am Turns
No more “it works for me ¯\_(ツ)_/¯”. ... I wish the Yarn team would contribute their improvements into npm itself to simplify our...
Read more >
Read (Helping Your Child Succeed in School)
Books, magazines and programs are mentioned in this booklet as examples and are only ... although school is very important, it does not...
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