Ionic add platform ios error

Trying to build ios version. Running:

ionic platform add ios / cordova platform add ios return:

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.

Error: Cannot find module ‘buffer-shims’

Ionic info:
Cordova CLI: 7.0.1
Ionic Framework Version: 2.0.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: OS X Yosemite
Node Version: v8.0.0
Xcode version: Not installed

In other forums people talked about run: rm -rf ~/.cordova but didnt solve my error.

Thanks!

Out of curiousity, why run cordova platform add ios ?
ionic platform add ios works on its own

Only run cordova platform add ios to see if the return was the same from ionic platform add ios

Anyone that solved this error ?

I am able to solve this problem by calling npm install buffer-shims on the project directory.