Ionic Framwork error when trying to add ios platform project

I was trying to create a new Ionic project and when I ran the command:

ionic platform add ios

I got the following error at the end:

Running command:
/Users/nnation/myApp/hooks/after_prepare/010_add_platform_class.js
/Users/nnation/myApp Error: spawn EACCES
at exports._errnoException (util.js:746:11)
at ChildProcess.spawn (child_process.js:1162:11)
at Object.exports.spawn (child_process.js:995:9)
at Object.exports.spawn (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:100:31)
at runScriptViaChildProcessSpawn (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:188:23)
at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:131:16)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:114:20
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)

I am not sure what that ment, so i ran it again and I got the following:

$ sudo ionic platform add ios running cordova platform add ios
Platform ios already added.

Thinking that everything is good i then ran:

$ sudo ionic build ios

And then this happen again:

running cordova build ios Running command:
/Users/nnation/myApp/hooks/after_prepare/010_add_platform_class.js
/Users/nnation/myApp Error: spawn EACCES
at exports._errnoException (util.js:746:11)
at ChildProcess.spawn (child_process.js:1162:11)
at Object.exports.spawn (child_process.js:995:9)
at Object.exports.spawn (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:100:31)
at runScriptViaChildProcessSpawn (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:188:23)
at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:131:16)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:114:20
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)

Can someone assist me in figuring what is wrong or what i am missing? I am running MacOS.

You could also try running

$ ionic platform update ios

…and see how that gets you?

EACCES is a permissions error. Try running through the solutions in these posts to see if they work: