An error occurred when I was running ionic cordova platform add ios
.It noticed me with the information
[ERROR] Cordova encountered an error. You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova platform add ios --save (exit code 1):
Using cordova-fetch for cordova-ios@^4.4.0
Adding zone.js project...
Error: Your zone.js platform does not have Api.js”
I had tried to update the version of ionic / cordova and also reinstalled node.js and npm.But It still no worked.
Who can tell me how to resolve this problem。Thank you.
This problem had been resolved by using commands
cordova platform rm ios
cordova platform add ios --nofetch
Your iOS platform seems to corrupted. Please remove and re-add the platform to resolve the issue using following commands:
cordova platform rm ios
cordova platform add ios
If it happens when you try ionic cordova run/build android
it will work with the same steps
cordova platform rm android
cordova platform add android
Then run ionic cordova run/build android
and it will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With