@shazron added an even better (inofficial) “solution” to use, that also works if you readd the ios platform:
In the meantime, I cherry-picked the ios-sim fix only and applied it to cordova-ios@4.4.0
To use: cordova platform add https://github.com/apache/cordova-ios.git#4.4.0-ios-sim
This is not an official release of Apache Cordova.
The solution for me was run ionic cordova build ios and after open Xcode to run in a simulator o in a device. is more slow but work for me, I hope Cordova release the solution in the next days.
Is anyone getting this problem when doing run android? Im getting this exact same error for android but not ios? Doing run ios works fine. All my sdk and jdks are properly configured in bash …
I am having the same problem when trying to emulate Android, I decided as follows:
I opened the android emulator by AndroidStudio
Then I ran the emulate android cordova command
I put the package.json there and did npm install ios-sim
now I get the following
[12:30:09] Failed to read the projects ionic.config.json file: ENOENT: no such file or directory, open
'/Applications/MAMP/htdocs/ionic/newBuild/platforms/ios/cordova/ionic.config.json'
[WARN] Error occurred during command execution from a CLI plugin
(@ionic/cli-plugin-cordova). Your plugins may be out of date.
Error: /Applications/MAMP/htdocs/ionic/newBuild/platforms/ios/cordova/src/app/main.ts was not found. The "main.dev.ts" and "main.prod.ts" files have been deprecated. Please create a new file "main.ts" containing the content of "main.dev.ts", and then delete the deprecated files.
For more information, please see the default Ionic project main.ts file here:
https://github.com/driftyco/ionic2-app-base/tree/master/src/app/main.ts
Thanks @Sujan12 This fixed it for me. Bit of a shame that after 3 months this is still an issue.
I’d just started on ionic2 with a fresh install of everything and a simple ionic cordova emulate ios doesn’t work without this fix!
That is actually an issue with Cordova in general, they are sometimes not that fast in releasing updates as not really that many people are working on it. As far as I understand the problem, it also depends on your local configuration so not all people get the error.