Ionic cordova platform add ios / android - fails with errors

JD4SW-MacBook-Pro:permissions2 Jonathan$ ionic cordova platform add ios

cordova platform add ios --save
Error: Cannot find module ‘internal/util/types’
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at evalmachine.:31:26
at Object. (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/fs.js:11:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions…js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
[ERROR] Exception:

It also produces the same output when adding both iOS and android

My Ionic Info output is

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 4.3.0

local packages:

@ionic/app-scripts : 3.1.10
Cordova Platforms  : none
Ionic Framework    : ionic-angular 3.9.2


Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2
ios-sim           : 3.1.1
Node              : v8.11.3
npm               : 6.1.0
OS                : macOS High Sierra
Xcode             : Xcode 9.4.1 Build version 9F2000

Environment Variables:

ANDROID_HOME : /Users/Jonathan/Library/Developer/Xamarin/android-sdk-macosx


backend : pro

Have you found a solution? I’m getting the same error when running ionic serve with Node v8.12.0.

To be perfectly honest, Ive stopped developing with ionic. So I’ve no solution, sorry.

Well that’s also a solution :laughing: My workaround ATM is to use node v6.9.