-
Notifications
You must be signed in to change notification settings - Fork 7.3k
run npm command gives error "/usr/bin/env: node: No such file or directory" #3911
Comments
Not a node bug. The node binary is not on your $PATH. |
I've found this is often a misnaming error, if you install from a package manager you bin may be called nodejs so you just need to symlink it like so "ln -s /usr/bin/nodejs /usr/bin/node" |
digitalmediums, |
After 3 hours of suffering, this is the solution. Thank you digitalmediums. Why is this now misnaming happening now out of the blue? |
@houmie (and everyone who comes across this bug in the future) These explain why: http://lists.debian.org/debian-devel-announce/2012/07/msg00002.html As a Node developer, I would think hard before using Debian's packaged version of node, and would use Ubuntu with chrislea's PPA for Node or Debian stable with Node built from source in preference to the stock Debian nodejs package for the foreseeable future. The discussion on this bug makes clear that Debian has a very different idea of the role of Node in the wider world than most of the Node community. |
@othiym23 Thank you for the explanation. :) I see there is a proper flame war around this. But its understandable when namespaces are broken. Hope they can resolve it at one stage. |
@digitalmediums Thx |
Thanks for the help. |
@digitalmediums Thanks! |
I installed via sudo make install. npm still fails: /work/qpp$ sudo npm install -g grunt-cli |
@johnjbarton Try |
Thanks. However in the meantime I uninstalled node, unintalled npm, then On Fri, Apr 12, 2013 at 2:13 PM, Ben Noordhuis notifications@git.luolix.topwrote:
|
Just do $ sudo apt-get install nodejs-legacy |
Yes, installing Imho trying to name a server with a generic word like |
For very restricted definitions of 'everyone'. You're only two or three years late - that ship has long sailed. |
That ship sailed a long time ago and those arguments only really apply to something that's not vastly popular. node.js is popular enough to claim the As for not being googlable: https://www.google.com/?q=node |
Thanks, |
@othiym23 : Thanks for the details on ubuntu/debian... |
I had to append /usr/bin to PATH in my PHP code : putenv('PATH=' . getenv('PATH') . ':/usr/local/bin:/usr/bin'); |
"update-alternatives --install /usr/bin/node node /usr/bin/nodejs 99" this fixed it for me |
or just |
rlidwka's solution is the one, I arrived. Except the fact, I didn't see it & gone through infinite suffering. |
you sound like Zathras :) |
i did :$ ln -s /usr/bin/nodejs /usr/bin/node |
sudo ln -fs /usr/bin/nodejs /usr/local/bin/node |
Yes, digitalmediums' answer fixed it. |
digitalmediums, |
Thank you, it worked for me! |
@digitalmediums you are right till now. thank you! |
Great!, thanks for the post |
Symlink worked great for Debian deploy, thanks! |
sudo apt-get install nodejs-legacy |
sudo apt-get install nodejs-legacy worked :) |
Some Linux distributions installs NodeJS as nodejs and not node. Simply create a link as |
thanks, my npm is working now. |
@fgesora 's solution works for me, thanks 👍 (I use nvm) |
Thanks, worked for me =) |
Thanks @digitalmediums |
thanks @digitalmediums |
thanks @digitalmediums |
dude, thanks! @digitalmediums |
@digitalmediums you are the great guy! This shitty issue still happens almost 4 yeah later.. (: |
thanks for the help |
I expected them to fix it after 3 years.... |
Wow, this issue has been since last 4 years... well thats interesting |
I found this amazing and shocking. Really lack of caring. |
For people coming here through search engines, the correct solution is #3911 (comment) or #3911 (comment). To the last three commenters: If you are unhappy that Debian decided to call the binary Locking. |
This happens in version 0.6.x on ubuntu. Does not happen above 0.7.x
The text was updated successfully, but these errors were encountered: