当我运行“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
答案 0 :(得分:5)
以下命令应解决此问题:
cordova平台添加ios @ latest
答案 1 :(得分:1)
在我的package.json
里面有一个ios:0.0.1
,我将其移除并解决了。