-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"yarn" command should look for both "node" and "nodejs" #1142
Comments
+1 |
Daniel15
added a commit
to Daniel15/yarn
that referenced
this issue
Oct 18, 2016
…r "nodejs" Also fixes Cygwin. Closes yarnpkg#1142 Closes yarnpkg#819
Daniel15
added a commit
to Daniel15/yarn
that referenced
this issue
Oct 18, 2016
…r "nodejs" Also fixes Cygwin. Closes yarnpkg#1142 Closes yarnpkg#819
Daniel15
added a commit
to Daniel15/yarn
that referenced
this issue
Oct 18, 2016
…r "nodejs" Also fixes Cygwin. Closes yarnpkg#1142 Closes yarnpkg#819
Daniel15
added a commit
to Daniel15/yarn
that referenced
this issue
Oct 18, 2016
…r "nodejs" Also fixes Cygwin. Closes yarnpkg#1142 Closes yarnpkg#819
Daniel15
added a commit
that referenced
this issue
Oct 19, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Yarn always executes
node
(due to the shebang of#!/usr/bin/env node
), and always executesnodejs
on Debian/Ubuntu (wesed
the shebang when building the package: https://github.com/yarnpkg/yarn/blob/master/scripts/build-deb.sh#L74).The tricky/unfortunate thing with Node.js on Debian is that
/usr/bin/node
conflicted with another package. See:https://lists.debian.org/debian-devel-announce/2012/07/msg00002.html
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614907
In the end, both packages that used the
node
binary name were renamed - Node.js becamenodejs
, and the other Node (some ham radio app) becameax25-node
. This means that when installing Node.js via Debian package, the binary is callednodejs
. However, for other installation methods (such asnvm
), the binary is callednode
.Installing both Yarn and Node.js via Debian package is generally the preferred method, and works fine. However, this naming does have several implications when mixing and matching different installation styles:
npm
will fail with Node.js installed via Debian package (it'll try to runnode
which doesn't exist)nodejs
which doesn't exist)Often people work around this by symlinking
/usr/bin/node
to/usr/bin/nodejs
or vice-versa, but that's hacky.Instead, we should update
bin/yarn
to try bothnode
andnodejs
. For example, try to executenode yarn.js
, and if that fails, try to executenodejs yarn.js
instead.Also see https://github.com/yarnpkg/rfcs/issues/9
The text was updated successfully, but these errors were encountered: