如何修复无法获取平台cordova-ios@~4.5.1

时间:2018-03-10 12:48:37

标签: ios build ionic2 platform

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

我也尝试使用以下命令更新npm但它无法正常工作。 命令:

  

npm update -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: 

1 个答案:

答案 0 :(得分:0)

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