Can't install ionic macbook

When I run the command
npm install -g cordova ionic;

gets the following errors in the end
npm ERR! Darwin 15.0.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” “cordova” "ionic"
npm ERR! node v5.3.0
npm ERR! npm v3.3.12
npm ERR! path /usr/local/lib/node_modules/ionic/node_modules/async
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/ionic/node_modules/async’
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules/ionic/node_modules/async’]
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: ‘/usr/local/lib/node_modules/ionic/node_modules/async’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

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

Global npm install requires root. Try using:

sudo npm install -g cordova ionic

Worked :smile: Thakn yo so much. I tried it with sudo, and chown the permissions

1 Like

Or alternatively you can install node with homebrew to avoid using sudo