Hi, I have same problem of first message in this topic. I have OS X 10.10.5, i have repaired permission in utility and in recovery mode, using sudo doesn’t work the command
sudo npm install -g cordova ionic
all software needed are installed, in $PATH is present the directory usr/local/lib
Password:
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.2.0","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
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
path.js:424
var path = (i >= 0) ? arguments[i] : process.cwd();
^
Error: EACCES: permission denied, uv_cwd
at Error (native)
at Object.posix.resolve (path.js:424:50)
at startup (node.js:93:32)
at node.js:961:3
/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
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
path.js:424
var path = (i >= 0) ? arguments[i] : process.cwd();
^
Error: EACCES: permission denied, uv_cwd
at Error (native)
at Object.posix.resolve (path.js:424:50)
at startup (node.js:93:32)
at node.js:961:3
npm WARN engine cordova-js@4.0.0: wanted: {"node":"~0.10.x"} (current: {"node":"4.2.0","npm":"2.14.7"})
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.2.0","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.0
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! spawn-sync@1.0.13 postinstall: `node postinstall`
npm ERR! Exit status 1
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/davideandreoli/npm-debug.log`
So if you are having issues you might wanna check it out.
Prerequisite: npm must be installed. You can check this by entering this command: ‘npm -v’. This should give you the version number. If not please install them.
Once I did this, Ionic worked beautifully. This was done on a MacBook Pro (Retina, 13-inch, Late 2012), running OSX El Capitan 10.11.2.
I’m not sure if Windows users have any issues with this, but I believe that you should remove the ‘sudo’ if you are doing this on windows.
Now that you have followed my steps, both Ionic and Cordova should be installed, and working. Start by creating a blank Ionic project:
HI EVERYBODY ,i have same problem in installing ionic.
i try install ionic2 on el capitan 10.11.1 when i try to install with this commandnpm install -g ionic cordova or any command that exist on this page unfortunately not work .
error that i Deal with it :
npm ERR! Invalid name: "@ionic/app-generators"
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /Users/mohamad/npm-debug.log.