2

I want to install Ionic on xUbuntu.

When I execute sudo npm install -g ionic, I get the following output but have no idea what the issue is.

npm WARN package.json eyes@0.1.8 No repository field.
npm WARN package.json faye-websocket@0.4.4 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json indexof@0.0.1 No repository field.
/usr/local/bin/ionic -> /usr/local/lib/node_modules/ionic/bin/ionic

> node-sass@3.4.2 install /usr/local/lib/node_modules/ionic/node_modules/node-sass
> node scripts/install.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! node-sass@3.4.2 install: `node scripts/install.js`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the node-sass@3.4.2 install script.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.2.0-27-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "ionic"
npm ERR! cwd /home/sisko
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/sisko/npm-debug.log
npm ERR! not ok code 0
halfer
  • 19,824
  • 17
  • 99
  • 186
sisko
  • 9,604
  • 20
  • 67
  • 139

1 Answers1

2

sh: 1: node: not found

This seems to be the cause of the error.

You probably just need to install the legacy nodejs package:

sudo apt-get install nodejs-legacy

for more info see Cannot install packages using node package manager in Ubuntu

Another alternative is to use nvm https://github.com/creationix/nvm#installation , which lets you switch between different versions of node

nvm install node --reinstall-packages-from=node
nvm alias default node
Community
  • 1
  • 1
FuzzyTree
  • 32,014
  • 3
  • 54
  • 85