Thanh Nguyen
Thanh Nguyen

Reputation: 21

"ionic cordova platform add ios" Failed to fetch platform [email protected]

When I run "ionic cordova platform add ios", that got the following error. How to fix it?

Exception: Using cordova-fetch for [email protected]

    Error: Failed to fetch platform [email protected]
    Probably this is either a connection problem, or platform spec is incorrect.
    Check your connection and platform name/version/URL.
    Error: npm: Command failed with exit code 1 Error output:
    npm ERR! code ETARGET
    npm ERR! notarget No matching version found for [email protected]
    npm ERR! notarget In most cases you or one of your dependencies are requesting
    npm ERR! notarget a package version that doesn't exist.

    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/thanhnguyen/.npm/_logs/2017-08-25T10_34_19_961Z-debug.log

Upvotes: 2

Views: 4568

Answers (2)

Milad
Milad

Reputation: 28600

Inside my package.json there was a ios:0.0.1 which I removed and got resolved.

Upvotes: 3

Gandhi
Gandhi

Reputation: 11935

The following command should resolve the issue:

cordova platform add ios@latest

Upvotes: 7

Related Questions