Yarn: `yarn link` should create a global symlink to the binary

Created on 14 Jun 2017  ·  3Comments  ·  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?

Request a feature.

What is the current behavior?

yarn link does not register the binary as a global symlink the way npm link does.

What is the expected behavior?

Running yarn link should create links to both the package main file and the bin file, the same way npm link does.

So, if my package.json contains a bin file, e.g.

{
  "bin": {
    "example": "./bin/cli.js"
  }
}

... then running yarn link should symlink bin/cli.js as example in my global bin folder, making example a global command.

Please mention your node.js, yarn and operating system version.

$ node -v && yarn --version && sw_vers
v8.1.1
0.24.5
ProductName:    Mac OS X
ProductVersion: 10.12.5
BuildVersion:   16F73
good first issue help wanted triaged

Most helpful comment

I'm running 1.3.2 and I don't get global bin created after doing yarn link.
npm link works as expected.

All 3 comments

This was fixed in #3721.

I'm running 1.3.2 and I don't get global bin created after doing yarn link.
npm link works as expected.

Was this page helpful?
0 / 5 - 0 ratings