“离子cordova平台添加ios”无法获取平台cordova-ios@0.0.1

时间:2017-08-25 10:49:48

标签: ios cordova ionic-framework

当我运行“ionic cordova platform add ios”时,出现以下错误。如何解决?

Exception: Using cordova-fetch for cordova-ios@0.0.1

    Error: Failed to fetch platform cordova-ios@0.0.1
    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 cordova-ios@0.0.1
    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

2 个答案:

答案 0 :(得分:5)

以下命令应解决此问题:

  

cordova平台添加ios @ latest

答案 1 :(得分:1)

在我的package.json里面有一个ios:0.0.1,我将其移除并解决了。