【问题标题】:How to fix Failed to fetch platform cordova-ios@~4.5.1如何修复无法获取平台cordova-ios@~4.5.1
【发布时间】:2018-03-10 12:48:36
【问题描述】:

我正在使用 Ionic 2 开发一个混合应用程序,我想添加平台 iOS 但无法添加平台。

我也尝试使用以下命令更新 npm,但它不起作用。 命令:

npm 更新 -g

下面是我的终端输出,显示了我收到的错误,有人可以推荐解决此问题的解决方案吗?

Using cordova-fetch for cordova-ios@~4.5.1

Error: Failed to fetch platform cordova-ios@~4.5.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! Darwin 17.4.0
npm ERR! argv "/usr/local/bin/node" "/Users/admin/ionic 2/Selfstuff daily/SelfStuff Daily Design/node_modules/npm/bin/npm-cli.js" "install" "cordova-ios@~4.5.1" "--production" "--save-exact"
npm ERR! node v8.9.3
npm ERR! npm  v2.15.12
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package @angular/common@4.1.3 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer @angular/forms@4.1.3 wants @angular/common@4.1.3
npm ERR! peerinvalid Peer @angular/platform-browser@4.1.3 wants @angular/common@4.1.3
npm ERR! peerinvalid Peer @angular/platform-browser-dynamic@4.1.3 wants @angular/common@4.1.3
npm ERR! peerinvalid Peer angularfire2@2.0.0-beta.7-pre wants @angular/common@^2.0.0
npm ERR! peerinvalid Peer ionic-angular@3.6.1 wants @angular/common@4.1.3

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/admin/ionic 2/Selfstuff daily/SelfStuff Daily Design/npm-debug.log

[ERROR] Exception: 

【问题讨论】:

    标签: ios build ionic2 platform


    【解决方案1】:

    您应该将所有软件包更新到最新版本,然后重试。

    【讨论】:

      猜你喜欢
      • 2018-01-11
      • 2016-09-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-22
      • 2020-06-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多