Cannot install ionic

please help me, I coudln’t figure out what the problem is.

sudo npm install -g cordova ionic
npm WARN engine xmlbuilder@2.2.1: wanted: {“node”:“0.8.x || 0.10.x”} (current: {“node”:“4.2.1”,“npm”:“2.14.7”})

spawn-sync@1.0.13 postinstall /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/cross-spawn/node_modules/spawn-sync
node postinstall

sh: node: command not found
/usr/local/bin/cordova → /usr/local/lib/node_modules/cordova/bin/cordova

node-sass@3.3.3 install /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/node-sass
node scripts/install.js

sh: node: command not found
npm WARN engine cordova-js@4.0.0: wanted: {“node”:“~0.10.x”} (current: {“node”:“4.2.1”,“npm”:“2.14.7”})
npm WARN engine xmlbuilder@2.2.1: wanted: {“node”:“0.8.x || 0.10.x”} (current: {“node”:“4.2.1”,“npm”:“2.14.7”})
npm ERR! Darwin 14.5.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” “cordova” “ionic”
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! spawn-sync@1.0.13 postinstall: node postinstall
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the spawn-sync@1.0.13 postinstall script ‘node postinstall’.
npm ERR! This is most likely a problem with the spawn-sync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node postinstall
npm ERR! You can get their info via:
npm ERR! npm owner ls spawn-sync
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/qinking126/npm-debug.log

1 Like

Same here. I tried following some other methods and can’t seem to find the right combination of things.

Can you make sure that /usr/local/bin is in your $PATH? First check by doing an:

echo $PATH

to see what it is. If /usr/local/bin is not in your $PATH, add it into either your .bash_profile or .bashrc in your home directory.

It is definitely in my path. I just went to update Ionic again and… same thing. Appears to be an issue with “spawn-sync”.

Same issue here - any progress?

Same here. happened after updating. :frowning: