Mostafa Mostafa - 7 days ago 4x
iOS Question

Error while installing Ionic with node v5.0.0 and npm v3.3.6

I have installed nodejs version 5.0.0 and npm 3.3.6 on my MacBook pro. Every time i try to install ionic i get the following error:

npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ionic"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! syscall read

How can i fix this ?


After reading the Cordova API CLI requirements on OSX. i found out that i need the have all iOS SDK tools which is part of XCode installation.

Cordova CLI requirements for OSX:

So this is the steps to get Ionic up and running on OSX ElCapitan 10.11.1 and to fix the issue i had earlier:

1) Download and then Install XCode on your OSX.

2) Run the following command in your terminal:

sudo npm install -g cordova ionic

3) You will be able to install both Cordova and Ionic on your machine with no errors as it was showing earlier.

4) Try to create a project to validate everything is good to go in the terminal window:

ionic start mostafaApp1 tabs

You will find that the project has been created successfully.

Hope this helps.