Error Installing Google Maps Native Plugin in with Ionic

I am using Ionic 3-Angular 4 to build an app, and I am trying to add Google Maps native SDK plugin and I keep getting the following Error:

Error: Failed to fetch plugin file:node_modules/cordova-plugin-googlemaps via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963229 Error output:
npm ERR! path C:\Users\shawe\Desktop\Xampp Server\Ionic\beitelmagdes\node_modules\cordova-plugin-googlemaps\npm-shrinkwrap.json
npm ERR! code ELOOP
npm ERR! errno -4067
npm ERR! syscall open
npm ERR! ELOOP: too many symbolic links encountered, open ‘C:\Users\shawe\Desktop\Xampp Server\Ionic\beitelmagdes\node_modules\cordova-plugin-googlemaps\npm-shrinkwrap.json’

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\shawe\AppData\Roaming\npm-cache_logs\2017-11-16T07_43_23_428Z-debug.log

[ERROR] An error occurred while running cordova plugin add cordova-plugin-googlemaps --variable
API_KEY_FOR_ANDROID=AIza… (exit code 1).

Please Help

Open the config.xml, package.json and package-lock.json files, then remove the lines cordova-plugin-googlemaps from them.

Then install without cache

$> npm clean cache

$> cordova plugin add cordova-plugin-googlemaps --variable
API_KEY_FOR_ANDROID="..." --no-cache

Well, I tried that, but it is still not working. What I realized is, it generates this error only if IOS platform is added.
I tried adding the platform first, and then adding the plugin and it gives the error.
Then, it does the same thing when I reverse the process, but it works very fine between Android plaform and the plugin.
So, it is only a problem of IOS and the plugin. Any help?

first resolve issue need to resovle

ionic doctor check

then remove the google maps plugin

$ npm uninstall --save @ionic-native/google-maps
ionic cordova plugin rm cordova-plugin-googlemaps

you may have to remove the ios plaform and readd it to clear dependencies

ionic cordova platform rm ios
ionic cordova platform add ios

then re-add google maps plugin

1 Like