hey today i switch to ionic beta version but when i am trying to install it. This throws an error what i am doing wrong do i need to change my node --version ?
$ npm install -g ionic@beta
C:\Users\nitish.kumar.IDS-LOGIC\AppData\Roaming\npm\ionic -> C:\Users\nitish.kumar.IDS-LOGIC\AppData\Roaming\npm\node_modules\ionic\bin\ionic
> ionic@2.0.0-beta.17 postinstall C:\Users\nitish.kumar.IDS-LOGIC\AppData\Roaming\npm\node_modules\ionic
> node lib/tasks/postinstall
C:\Users\nitish.kumar.IDS-LOGIC\AppData\Roaming\npm\node_modules\ionic\lib\tasks\postinstall.js:9
execSync(cmd, {stdio: [0,1,2]});
^
TypeError: undefined is not a function
at Object.<anonymous> (C:\Users\nitish.kumar.IDS-LOGIC\AppData\Roaming\npm\node_modules\ionic\lib\tasks\postinstall.js:9:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:929:3
npm ERR! ionic@2.0.0-beta.17 postinstall: `node lib/tasks/postinstall`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the ionic@2.0.0-beta.17 postinstall script.
npm ERR! This is most likely a problem with the ionic package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node lib/tasks/postinstall
npm ERR! You can get their info via:
npm ERR! npm owner ls ionic
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "ionic@beta"
npm ERR! cwd C:\Users\nitish.kumar.IDS-LOGIC
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
Use the command quoted below to wipe out ionic and cordova, clear &&/|| clean cache, and then reinstall, this little command has saved me so many times that i have an alias for it called uionic
I tried all that multiple times and still getting the same errors as the author.
npm ERR! ionic@2.0.0-beta.17 postinstall: node lib/tasks/postinstall
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the ionic@2.0.0-beta.17 postinstall script ānode lib/tasks/postinstallā.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node lib/tasks/postinstall
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic
npm ERR! Or if that isnāt available, you can get their info via:
npm ERR! npm owner ls ionic
npm ERR! There is likely additional logging output above.
npm ERR! Darwin 15.3.0
npm ERR! argv ānodeā ā/usr/local/bin/npmā āiā ā-gā "ionic@beta"
npm ERR! node v0.10.42
npm ERR! npm v3.6.0
npm ERR! path npm-debug.log.792550016
npm ERR! code EACCES
npm ERR! errno 3
Is node 0.10.42 not high enough? Also: is it best practise to install with sudo or without?