JavaEar 专注于收集分享传播有价值的技术资料

The platform "ios" does not appear to be a valid cordova platform

I'm running under cordova@7.1.0, cordova-ios@4.5.2. Installed platforms: ios 4.5.2.

I run npm install, bower install then cordova prepare ios and i get the following error: Unable to load PlatformApi from platform. Error: Cannot find module 'unorm' Error: Unhandled "error" event. (The platform "ios" does not appear to be a valid cordova platform. It is missing API.js. ios not supported.)

The solution is to cordova platform rm ios and cordova platform add ios. But i have to do this each time i checkout my project from git ...

Do you have any suggestion to solve this issue?

Many thanks !


  1. You should not put the platforms (and plugins) folder into source-control. Reinstalling the platform after a fresh checkout is the expected behaviour.

    The files in the platforms folder are created dynamically which is why they should not be in source control.