cordova-plugin-googlemaps icon indicating copy to clipboard operation
cordova-plugin-googlemaps copied to clipboard

I can not install the plugin from multiple_maps branch.

Open gustperz opened this issue 9 years ago • 3 comments

I'm submitting a ... (check one with "x") [ ] question [x] any problem or bug report [ ] feature request

If you choose 'problem or bug report', please select OS: (check one with "x") [x] Android [ ] iOS

cordova information: (run $> cordova plugin list)

com-sarriaroman-photoviewer 1.1.11 "PhotoViewer"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-geolocation 3.0.0 "Geolocation"
cordova-plugin-headercolor 1.0 "HeaderColor"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly)

"@ionic-native/core": "4.3.3",
"@ionic-native/google-maps": "^4.4.0",
"cordova-plugin-googlemaps": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps.git#multiple_maps",

in my comfig.xml

<plugin name="cordova-plugin-googlemaps" spec="git+https://github.com/mapsplugin/cordova-plugin-googlemaps.git#multiple_maps">

Current behavior: I can not install the plugin from multiple_maps branch. I'm trying to do a clean installation, the same error with cordova prepare, I also got the same result when I added the platform, and doing it directly with cordova plugin add, the same error.

Failed to restore plugin "cordova-plugin-googlemaps" from config.xml.
You might need to try adding it again. 
Error: Failed to fetch plugin git+https://github.com/mapsplugin/cordova-plugin-googlemaps.git#multiple_maps via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module

gustperz avatar Nov 30 '17 03:11 gustperz

$> git clone https://github.com/mapsplugin/cordova-plugin-googlemaps

$> git checkout multiple_maps

$> git pull

$> cd (project dir)

$> cordova plugin rm cordova-plugin-googlemaps

$> cordova plugin add (path to)/cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="..." --variable API_KEY_FOR_IOS="..." 

wf9a5m75 avatar Nov 30 '17 04:11 wf9a5m75

Your output indicates that it tries to fetch the plugin via the central repo:

Error: Failed to fetch plugin git+https://github.com/mapsplugin/cordova-plugin-googlemaps.git#multiple_maps **via registry**.

Try to use

cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps.git#multiple_maps --nofetch

The --nofetch flag will lead to cordova fetching the plugin via git and not the central repo (you'll see via git clone).

Edit: Note that if you use ionic you cannot seem to use "ionic cordova plugin add [...] --nofetch" as the ionic CLI does not seem to forward the --nofetch flag.

otruffer avatar Nov 30 '17 15:11 otruffer

@gustperz ping

wf9a5m75 avatar Nov 30 '17 20:11 wf9a5m75