Yarn link does not work
This is a bug report
Current behavior, and step to produce:
To illustrate the problem (bug) I have created a sample repo, which you can find at: https://github.com/ApolloTang/issue-yarn-link-does-not-work
It has two folders: one has content which is the dependency package, the other a project that using the dependency package:
~/1/1-a/16-tools/yarn-link/issue-yarn-link-does-not-work
$ tree -F
.
├── dependency/
│ ├── index.js
│ ├── node_modules/
│ ├── package.json
│ └── yarn.lock
└── using-dependency/
├── index.js
└── package.jsonin dependency/ folder:
$ yarn linkscreenshot:

This created a link in my ~/.config/yarn/link.
To confirm this :
cd ~/.config/yarn/link; ls -l screenshot:

My ~/.config/yarn has the following structure:
screenshot:

From the above the link is indeed pointing to my dependency folder. To confirm:
screenshot:

Now that the link has created I can cd to the project folder to link the dependency; However, I got
error No registered package found called ....screenshot:

I also notice that if I go back to the dependency package folder, yarn can not unlink the package:
screenshot:

It seem like yarn link does not know where the directory~/.config/yarn/link is.
Here is the output of my yarn config list:

Here is the content of my .yarnrc:

Here is my environment:
screenshot:

Source: yarnpkg/yarn