You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the ionic repair command on a project which has previously had Cordova platforms added to it, everything works until the very last step (when the command attempts to re-add the platforms with cordova prepare). The end result is that Cordova platforms are not automatically added back to the project and need to be manually added again by running ionic cordova platform add <platform>.
Steps to Reproduce:
Start a new Ionic project using ionic start CordovaApp blank
cd to the project directory after the app is created
(Optional) To ensure a built www directory is included, run ionic build
Add cordova-android and/or cordova-ios to your project using one or both of the following commands:
ionic cordova platform add android
ionic cordova platform add ios
The platforms are added to your project
Run ionic repair
Notice that the final step of the repair command fails to re-add your platforms
Previously mentioned that this commit might fix the issue, but that doesn't appear to be the case: d9e1ced
It looks like package.json and config.xml both have references to the platforms, but they aren't checked by the CLI. Could be a quick fix, just need to check for the platforms in one (or either) of those files?
This is because Cordova 9 no longer manages platform & plugin versions in config.xml, only package.json. The fix will require reading and preferring package.json as the source of "which platforms are installed".
Description:
When using the
ionic repair
command on a project which has previously had Cordova platforms added to it, everything works until the very last step (when the command attempts to re-add the platforms withcordova prepare
). The end result is that Cordova platforms are not automatically added back to the project and need to be manually added again by runningionic cordova platform add <platform>
.Steps to Reproduce:
ionic start CordovaApp blank
cd
to the project directory after the app is createdwww
directory is included, runionic build
cordova-android
and/orcordova-ios
to your project using one or both of the following commands:ionic cordova platform add android
ionic cordova platform add ios
ionic repair
repair
command fails to re-add your platformsOutput:
My
ionic info
:Other Information:
Previously mentioned that this commit might fix the issue, but that doesn't appear to be the case: d9e1ced
It looks like
package.json
andconfig.xml
both have references to the platforms, but they aren't checked by the CLI. Could be a quick fix, just need to check for the platforms in one (or either) of those files?config.xml
package.json
The text was updated successfully, but these errors were encountered: