Skip to content
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

npm WARN: use of legacy binary "node" #59

Closed
aveeshkumar opened this issue May 18, 2014 · 5 comments
Closed

npm WARN: use of legacy binary "node" #59

aveeshkumar opened this issue May 18, 2014 · 5 comments

Comments

@aveeshkumar
Copy link

Hello - awesome project - awesome work by you - awesome speech in Budapest. But when I install under ubuntu 14.04 64 bit, npm start gives me:

npm ERR! weird error 127
npm WARN This failure might be due to the use of legacy binary "node"

on ubuntu, node env var is nodejs but i cant seem to figure out what/how to edit

~/webtorrent/bin/cmd.js has the env var node at the top but changing that to nodejs just brings up Webtorrent help screen in terminal

Would love to make it work - Thx

@feross
Copy link
Member

feross commented May 18, 2014

I just pushed a new version. Could you give that a try?

$ npm install webtorrent -g
$ webtorrent

@feross feross changed the title n00b issue npm WARN: use of legacy binary "node" May 18, 2014
@feross feross added the bug label May 18, 2014
@aveeshkumar
Copy link
Author

Thx for the reply

I first try to uninstall sudo npm uninstall webtorrent and it geives:

npm WARN uninstall not installed in /home/aveesh/webtorrent/node_modules:

"webtorrent"

I then try npm install webtorrent -g

and after downloading it gave me a few errors so I tried it as suo

sudo npm install webtorrent -g

no errors

when i type in webtorrent

/usr/bin/env: node: No such file or directory

I try npm start webtorrent (either in home doir or after cd webtorrent)

also npm_debug has

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/nodejs',
'/usr/bin/npm', 'start', 'webtorrent' ] 2 info using npm@1.3.10 3 info
using node@v0.10.25 4 error Error: ENOENT, open
'/home/aveesh/node_modules/webtorrent/package.json' 5 error If you need
help, you may report this log at: 5 error <
http://github.com/isaacs/npm/issues> 5 error or email it to: 5 error <
npm-@googlegroups.com> 6 error System Linux 3.13.0-24-generic 7 error
command "/usr/bin/nodejs" "/usr/bin/npm" "start" "webtorrent" 8 error cwd
/home/aveesh 9 error node -v v0.10.25 10 error npm -v 1.3.10 11 error path
/home/aveesh/node_modules/webtorrent/package.json 12 error code ENOENT 13
error errno 34 14 verbose exit [ 34, true ]

Sorry if I am bothering you - typing node gives this qhile nodejs gives me
a prompt
The program 'node' can be found in the following packages: * node *
nodejs-legacy

From the Desk of Aveesh Kumar

On Sun, May 18, 2014 at 2:23 PM, Feross Aboukhadijeh <
notifications@github.com> wrote:

I just pushed a new version. Could you give that a try?

$ npm install webtorrent -g$ webtorrent


Reply to this email directly or view it on GitHubhttps://github.com//issues/59#issuecomment-43437362
.

@transitive-bullshit
Copy link
Member

It seems you don't have a proper installation of node and/or npm.

I'd recommend reading up on a nodejs tutorial and making sure you're comfortable with the dependencies before delving into webtorrent.

You should then be able to run node --version and npm --version to verify they're both installed correctly. Only then should you try installing webtorrent with npm install -g webtorrent

@feross
Copy link
Member

feross commented May 19, 2014

I think the issue is that you used apt-get on Ubuntu 13.10+ to install node and that installs a nodejs command -- not a node command. This causes the webtorrent command (and most other node command line programs!) to break because we're using #!/usr/bin/env node at the top of the file to start node.

The quickest way to solve the problem seems to be to run sudo apt-get install nodejs-legacy which just installs a node command.

See: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os for more info.

@feross
Copy link
Member

feross commented May 19, 2014

I'm closing this for now since this isn't really a webtorrent issue. But feel free to reply if this doesn't solve your problem and we'll try to help.

@feross feross closed this as completed May 19, 2014
@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants