1

Using this version of Cordova with older version of cordova-ios is deprecated. Upgrade to cordova-ios@4.0.0 or newer.

Error: Your ios platform does not have Api.js

sh-3.2# cordova --version
7.0.1

sh-3.2# ionic cordova build ios
> ionic cordova prepare
✖ cordova prepare - failed!
[ERROR] An error occurred while running cordova prepare (exit code 1):


        Discovered plugin "it.mobimentum.phonegapspinnerplugin" in config.xml. Adding it to the project
        Failed to restore plugin "it.mobimentum.phonegapspinnerplugin" from config.xml. You might need to try adding it
        again. Error: Error: Registry returned 404 for GET on
        https://registry.npmjs.org/it.mobimentum.phonegapspinnerplugin

sh-3.2# cordova platform version ios
Installed platforms:
  android 5.2.2
  browser 4.1.0
  ios 4.4.0
Available platforms:
  blackberry10 ~3.8.0 (deprecated)
  osx ~4.0.1
  webos ~3.7.0

As per the LuminousEagle's answer I have tried to add and remove platforms by doing

cordova platform rm ios
cordova platform add ios

than again i run command

ionic cordova build ios

And still having error

sh-3.2# ionic cordova build ios
> ionic cordova prepare
✖ cordova prepare - failed!
[ERROR] An error occurred while running cordova prepare (exit code 1):


        Discovered plugin "it.mobimentum.phonegapspinnerplugin" in config.xml. Adding it to the project
        Failed to restore plugin "it.mobimentum.phonegapspinnerplugin" from config.xml. You might need to try adding it
        again. Error: Error: Registry returned 404 for GET on
        https://registry.npmjs.org/it.mobimentum.phonegapspinnerplugin

So, the plugin named "it.mobimentum.phonegapspinnerplugin" is not installing.

After searching a bit i found plugin github url from Usage section I have tried to install a plugin by doing

cordova plugin add https://github.com/mobimentum/phonegap-plugin-loading-spinner.git

It still shows an error

sh-3.2# cordova plugin add https://github.com/mobimentum/phonegap-plugin-loading-spinner.git
Error: Failed to fetch plugin https://github.com/mobimentum/phonegap-plugin-loading-spinner.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 235 Error output:
npm ERR! addLocal Could not install /tmp/npm-2500-e6f21046/git-cache-49279488/feeaeb845cd544e5875d75ff21d0504e50d315a4
npm ERR! Darwin 16.7.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "https://github.com/mobimentum/phonegap-plugin-loading-spinner.git" "--save"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code EISDIR
npm ERR! errno -21
npm ERR! syscall read

npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/plutus/Desktop/Croisiere-ios-3/node_modules/npm-debug.log

I dont find any proper way to get out of this issue.

Any help would be appreciated thank you in advanced.

Shashank Shah
  • 2,077
  • 4
  • 22
  • 46

0 Answers0