All cordova commands failing with exit code 1

Recently all of my corodova commands are failing. I can’t add the platform ios or add plugins. Here’s an example of an error:

cordova platform add ios --save
:heavy_multiplication_x: Running command - failed!
[ERROR] Exception: Using cordova-fetch for cordova-ios@^4.4.0

    Error: Failed to fetch platform cordova-ios@^4.4.0
    Probably this is either a connection problem, or platform spec is incorrect.
    Check your connection and platform name/version/URL.

Then i get a bunch of npm WARNs

has anyone else experienced this recently?

node version 8.5
npm version 5.4.2

What is your ionic info output?
Please post the full command and its output you are having problems with.

I believe this is an issue with XCode 9 and specifically the Ionic Native OneSignal plugin.

The solution is to make sure to globally install the latest npm, ionic, and cordova. If you blow away and rebuild your platforms, make sure to uninstall OneSignal before doing so, then re-install OneSignal once you have successfully built your platform ios.

Read this thread on Github: