mean-cli icon indicating copy to clipboard operation
mean-cli copied to clipboard

Installation error on `ubuntu aptitude npm`

Open AlmogBaku opened this issue 10 years ago • 2 comments

almog@chiefangel:~$ sudo npm install -g mean-cli
npm WARN engine [email protected]: wanted: {"node":"0.10.x","npm":"2.1.x"} (current: {"node":"0.10.25","npm":"1.4.21"})

> [email protected] preinstall /usr/local/lib/node_modules/mean-cli
> node ./scripts/preinstall

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

npm ERR! System Linux 3.16.0-23-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "mean-cli"
npm ERR! cwd /home/almog
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/almog/npm-debug.log
npm ERR! not ok code 0

I guess it happened because in ubuntu node installed as nodejs and not as node

AlmogBaku avatar Dec 12 '14 20:12 AlmogBaku

_It is caused because ubuntu call it nodejs and not node_ I just created symlink and it started to work.. so we need to fix this issue...... (and to check if its not happened on other places/repos of mean)

AlmogBaku avatar Dec 12 '14 20:12 AlmogBaku

I'd rather propose my approach (dating back to 2 years ago): give up on ubuntu's support for nodejs and install manually, from nodejs' tar.gz. Ubuntu tends to be rather slow in supporting fast changing nodejs development (when nodejs switched to 0.8 Ubuntu remained on 0.6 for months), and - as you have proven - tends to do weird stuff with symlinking.

andrija-hers avatar Dec 12 '14 21:12 andrija-hers