Ionic platform add ios error

Hi team

I am having an issue with the following command:

ionic platform add ios

I have been following along with this tutorial https://www.firebase.com/docs/web/libraries/ionic/guide.html

However when I get to point of entering the above command it throws this error message.

Updated the hooks directory to have execute permissions
module.js:339
    throw err;
    ^

Error: Cannot find module 'umask'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/npm/lib/utils/umask.js:1:75)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)

Any ideas?

Thanks in advance.

2 Likes

I’m guessing you are using a Mac. :smile:

did you try sudo ionic platform add ios ?

also check out:

Having the exact same problem. Can anyone help. yes tried it with sudo and exact same results both for ios and android.

Ok I got it working. What i did was install homebrew and then took node off with it and then reinstalled everything… installing node with homebrew then
$ npm install -g ionic
and then finally
$ npm install -g cordova ionic

and i dont get those errors anymore