Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: npm install fails  (Read 992 times)

Offline bitcoinerS

  • Hero Member
  • *****
  • Posts: 583
    • View Profile
npm install fails
« on: September 15, 2014, 09:03:21 PM »

Having trouble installing npm on a new Ubuntu 14.10 beta machine

Code: [Select]
bitsharesx/programs/web_wallet $ npm install
/
> [email protected] postinstall /home/bitcoiners/dev/projects/bitsharesx/programs/web_wallet/node_modules/lineman-less
> node script/postinstall.js

sh: 1: node: not found
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] postinstall: `node script/postinstall.js`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is most likely a problem with the lineman-less package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node script/postinstall.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls lineman-less
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.16.0-14-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/bitcoiners/dev/projects/bitsharesx/programs/web_wallet
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/bitcoiners/dev/projects/bitsharesx/programs/web_wallet/npm-debug.log
npm ERR! not ok code 0

>>> approve bitcoiners

Offline svk

Re: npm install fails
« Reply #1 on: September 15, 2014, 09:08:47 PM »
Having trouble installing npm on a new Ubuntu 14.10 beta machine

Code: [Select]
bitsharesx/programs/web_wallet $ npm install
/
> [email protected] postinstall /home/bitcoiners/dev/projects/bitsharesx/programs/web_wallet/node_modules/lineman-less
> node script/postinstall.js

sh: 1: node: not found
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] postinstall: `node script/postinstall.js`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is most likely a problem with the lineman-less package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node script/postinstall.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls lineman-less
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.16.0-14-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/bitcoiners/dev/projects/bitsharesx/programs/web_wallet
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/bitcoiners/dev/projects/bitsharesx/programs/web_wallet/npm-debug.log
npm ERR! not ok code 0
Its a nodejs conflict rather than an npm issue. On Ubuntu you often have an older program called node, but nodejs also uses node as its executable so it ends up not working well.

Try uninstalling node with apt, then add the nodejs ppa and reinstall it with that. This tutorial worked for me iirc:

https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server
Worker: dev.bitsharesblocks

Offline bitcoinerS

  • Hero Member
  • *****
  • Posts: 583
    • View Profile
Re: npm install fails
« Reply #2 on: September 15, 2014, 09:47:18 PM »
node ppa is missing for 14.10..

tried uninstalling node, reinstalling nodejs.. nothing helped so far..
>>> approve bitcoiners

Offline santaclause102

  • Hero Member
  • *****
  • Posts: 2483
    • View Profile
Re: npm install fails
« Reply #3 on: September 15, 2014, 09:57:13 PM »
What helped me was:

Code: [Select]
sudo bash
cd /usr/bin
ln -s nodejs node

and then retry npm install

Offline bitcoinerS

  • Hero Member
  • *****
  • Posts: 583
    • View Profile
Re: npm install fails
« Reply #4 on: September 15, 2014, 10:07:56 PM »
What helped me was:

Code: [Select]
sudo bash
cd /usr/bin
ln -s nodejs node

and then retry npm install

This worked! Thanks.
>>> approve bitcoiners

Offline maqifrnswa

  • Hero Member
  • *****
  • Posts: 661
    • View Profile
Re: npm install fails
« Reply #5 on: September 15, 2014, 10:47:36 PM »
or:

Code: [Select]
apt-get install nodejs-legacy
that will do it for you

that's because there is another application named "node" and if you want to have "nodejs" provide "node" you need to link it or install "nodejs-legacy"

perhaps we should put that in the build documentation. I feel like it gets asked every few weeks.
maintains an Ubuntu PPA: https://launchpad.net/~showard314/+archive/ubuntu/bitshares [15% delegate] wallet_account_set_approval maqifrnswa true [50% delegate] wallet_account_set_approval delegate1.maqifrnswa true

Offline santaclause102

  • Hero Member
  • *****
  • Posts: 2483
    • View Profile
Re: npm install fails
« Reply #6 on: September 15, 2014, 10:48:16 PM »
or:

Code: [Select]
apt-get install nodejs-legacy
that will do it for you

that's because there is another application named "node" and if you want to have "nodejs" provide "node" you need to link it or install "nodejs-legacy"

perhaps we should put that in the build documentation. I feel like it gets asked every few weeks.
+5%  you mean the one on github?

 

Google+