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

install fails because missing legacy binary "node" #4

Open
tonokip opened this issue Jul 1, 2016 · 2 comments
Open

install fails because missing legacy binary "node" #4

tonokip opened this issue Jul 1, 2016 · 2 comments

Comments

@tonokip
Copy link

tonokip commented Jul 1, 2016

workaround1:

sudo ln -s `which nodejs` /usr/local/bin/node

workaround2:

sudo apt-get install nodejs-legacy

error:

~$ sudo npm install -g tinyg
-
> [email protected] install /usr/local/lib/node_modules/tinyg/node_modules/serialport
> node-pre-gyp install --fallback-to-build

/usr/bin/env: node: No such file or directory
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR!     npm owner ls serialport
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.19.0-30-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "tinyg"
npm ERR! cwd /home/rig
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/rig/npm-debug.log
npm ERR! not ok code 0
@bartossh
Copy link

bartossh commented Feb 25, 2017

When using npm run dev have an error:
node index.js

npm ERR! weird error 1
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

where in package.json

"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"start": "node index.js",
"dev": "nodemon index.js"
},

SOLUTION:

workaround2 works great. thx

@osamana
Copy link

osamana commented Mar 13, 2017

this solved it for me.
I used workaround 2 and installed npm modules with the option npm install --no-bin-links, this option is needed because the node_modules folder is in a vagrant shared folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants