2017-08-03 85 views
5

En son Cordova sürüm 7.0.1 için "cordova platform ekle ios" komutunu kullandığımda, alma işlemi başarısız oldu.Nasıl düzeltebilirim platform getirilemedi [email protected]~4.4.0

Varolan bir projeyi iOS 4.4.0 sürümüne yükseltmeye çalışıyorum, ancak iç rahatlığım için aynı hataya sahip yeni bir proje oluşturmaya çalıştım.

Aşağıdaki terminal çıktısı aldığım hataları gösteriyor, herkes bu sorunu çözmek için bir çözüm önerebilir mi?

Stuarts-MacBook-Pro:T Stu$ cordova create myApp org.apache.cordova.myApp myApp 
Creating a new cordova project. 
Stuarts-MacBook-Pro:T Stu$ cd myApp 
Stuarts-MacBook-Pro:myApp Stu$ cordova platform add ios 
Using cordova-fetch for [email protected]~4.4.0 
Error: Failed to fetch platform [email protected]~4.4.0 
Probably this is either a connection problem, or platform spec is incorrect. 
Check your connection and platform name/version/URL. 
Failed to get absolute path to installed module 
Stuarts-MacBook-Pro:myApp Stu$ cordova platform add ios 
Using cordova-fetch for [email protected]^4.4.0 
Error: Failed to fetch platform [email protected]^4.4.0 
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 254 Error output: 
npm WARN [email protected] No repository field. 
npm ERR! Darwin 16.0.0 
npm ERR! argv "/usr/local/Cellar/node/6.2.0/bin/node" "/usr/local/bin/npm" "install" "[email protected]^4.4.0" "--save" 
npm ERR! node v6.2.0 
npm ERR! npm v3.8.9 
npm ERR! path /Users/S/Development/T/myApp/node_modules/.staging/xml-escape-d330e1e1 
npm ERR! code ENOENT 
npm ERR! errno -2 
npm ERR! syscall rename 

npm ERR! enoent ENOENT: no such file or directory, rename '/Users/S/Development/T/myApp/node_modules/.staging/xml-escape-d330e1e1' -> '/Users/S/Development/T/myApp/node_modules/cordova-ios/node_modules/xml-escape' 

cevap

3

Bunu çözdüm, bir NPL sorunu gibi görünüyor ve bir Cordova değil. Ben sadece NPM'yi Terminal içinde güncelledim ve "cordova platformu ekleme ios" güncellemesinden sonra iyi çalıştı. Mutlu günler - 1! bulunan

npm update -g 
+0

İyi deneme ama hiçbir puro –

1
  1. Sil klasör cordova-ios,: node_modules/cordova-ios

  2. Tipi bu komut

    ionic cordova build ios