I have simple cordova project that I made 1,5 years ago. Few months ago I build it to android and it worked.
Now I try to build it for iOS but cordova build ios fails:
Discovered plugin "InAppBrowser" in config.xml. Adding it to the project
Failed to restore plugin "InAppBrowser" from config.xml. You might need to try adding it again. Error: Error: Registry returned 404 for GET on https://registry.npmjs.org/InAppBrowser
Discovered plugin "Network Information" in config.xml. Adding it to the project
Failed to restore plugin "Network Information" from config.xml. You might need to try adding it again. Error: Error: Invalid package.json
Building project: /Users/user1/projectname/platforms/ios/projectname.xcworkspace
Macbook, sierra, Xcode 8.1
npm version { npm: '3.10.9', ares: '1.10.1-DEV', http_parser: '2.7.0', icu: '57.1', modules: '48', node: '6.9.2', openssl: '1.0.2j', uv: '1.9.1', v8: '5.1.281.88', zlib: '1.2.8' }
cordova version 6.5.0
In my config.xml it says:
-->
I commented out the first one but the second one does not work either
You will need to update you plugins to latest version, since as I assume you must have added ios as platform more recently and plugins would have been added 1.5 years ago.
So those plugins must have already been fetched into plugins directory 1.5 years ago and must be of lower version to whats recently available.
Also you must update your cordova version to latest. You update it by below command
npm install -g cordova@latest
You can fire below command inside you app directory from command line, to get names of plugins.
cordova plugins ls
Note down all plugins names. (e.g. cordova-plugin-splashscreen)
Remove each one of them by below command.
cordova plugin rm cordova-plugin-splashscreen
After all of them have been removed add them again using below command.
cordova plugin add cordova-plugin-splashscreen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With