Cordova 8: Could not install from "ios" as it does not contain a package.json file
I'm not sure it is the same case but I was receiving the same error in a Ionic 4 project and what worked for me was to remove ios/
directory under the project root and re-running the command:
ionic cordova platform add ios
Hope it helps.
i was also facing the same issue, seems like if we have already built a capacitor for the particular platform it will throw this error. for me when i removed android capacitor build from the root of the project and when i retried. it started working for me.
i have same issue after update ionic remove path of
/platforms/android
ionic cordova platform add android