CLI does not work when installing with Yarn
Closed this issue ยท 1 comments
v0.6.2
Expected result
Run from the command line:
yarn global add livereload
...which gives me the following install output:
yarn global v0.23.2
warning No license field
[1/4] ๐ Resolving packages...
[2/4] ๐ Fetching packages...
[3/4] ๐ Linking dependencies...
[4/4] ๐ Building fresh packages...
success Installed "livereload@0.6.2" with binaries:
- livereload
warning No license field
โจ Done in 2.88s.
(everything looks like it SHOULD be good, but...)
Actual result
The binary does not appear to be registered to the command line. I keep getting the following:
livereload .
zsh: command not found: livereload
Why is this important?
I would like to use Yarn, not npm, though I'm defaulting to npm for now. It took me quite some time to realize that this was a problem related to your installer not having love for Yarn.
Hi. Thanks for the detailed error report.
yarn
is supposed to maintain compatibility with npm
. There's no installer for livereload other than the standard package.json
file definition and structure.
I'm inclined to think this is a path issue on your setup. The yarn
docs suggest you can specify a prefix:
yarn global add livereload --prefix /usr/local
yarnpkg/yarn#630 seems to spend a lot of time talking about issues like this. So does yarnpkg/yarn#648
Best of luck.