Reputation: 83
When I run ionic cordova prepare ios on my Macbook Air, I get the following error:
ENOENT: no such file or directory, open '/Users/myUserID/Ionic/myApp/platforms/ios/platform_www/cordova.js
I was previously able to run this command but after moving my latest code over (from Windows machine), now suddenly there is an issue.
Any ideas on where to troubleshoot this? Or what causes it?
Upvotes: 5
Views: 7773
Reputation: 3236
It seems the project is missing cordova.js
on platforms folder & while building it missing some important files , So you can run below commands for respective platforms.
Android
ionic cordova platform rm android --save
ionic cordova platform add android --save
iOS
ionic cordova platform rm ios --save
ionic cordova platform add ios --save
It should work..
Upvotes: 1
Reputation: 788
Try the following commands in order:
ionic cordova platform rm android --save
ionic cordova platform add android@latest --save
Upvotes: 8