-
Notifications
You must be signed in to change notification settings - Fork 918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
installation freezes whiling adding to iOS platform #2763
Comments
Please ask to the developer of "cordova-plugin-geolocation". I don't know other plugin details |
Sorry i meant cordova-plugin-googlemaps not geolocation. I will update the issue description |
Okay, please add the whole verbose log. |
I tried to reinstall it today and it works as expected without any issue. |
I'm having the same issue. Installation freezes at Here is the full log:
|
Technically the installation is not freezing, the git checkout is stuck on git index-pack subcommand for long time. Because the dependency is a git URL (https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk) the npm install command does a full git clone of the repository - which includes binary files for every version published in the repository. Also because it is a git dependency, there is no caching of the repository in .npm cache, so it checks out the whole repository on every clean build. The binary files are big (tens of MB) and because of that git clone must transfer lot of data, right now it is a 558.53 MiB repository (or to be more specific, the file in .git/objects/pack). Ideally every version of SDK should be published on NPM, thus dropping the install size down to the actual size of the framework file (currently around 45MB), but i am not sure how long is that acceptable (in NPM discussion from 2016, they disliked packages bigger than 20MB, but said that up to 120MB is possible ). Alternatively cordova-plugin-googlemaps-sdk could use GIT LFS (thus cutting out the binary files from actual GIT repository checkout, as git would only check out the repository without the binary files, then grab the binary files corresponding to the checked out branch) or as a final alternative, use a hook to grab the binary files instead of hosting them in the repository. |
NPM doesn't accept large files anymore. |
Cordova supports CocoaPod, but many beginners fail to use CocoaPod. That's why this plugin goes back this style. I think I did as far as I can do, except improving Cordova itself. |
This way is not acceptable. Because Cordova hook does not work on cloud build environment, such as phone gap build. |
Also, Cordova supports I'm looking for good idea, but I have no more ideas. |
Tarball install is probably broken: apache/cordova-cli#452 Unfortunately i do not have any other ideas either. For my use case, i solved the slow checkout by automatically changing the plugin.xml back to the CocoaPod way. I do that by preinstalling cordova-plugin-googlemaps at npm install phase of my project (as devDependency), then i automatically patch plugin.xml of cordova-plugin-googlemaps in node_modules before i do any cordova commands. But that is not an universal solution for everyone. |
Hi @faugusztin Can you please provide of how did you solve from stucking at installation? Thanks. |
As i said, installation is technically not stuck. If you check the process list (for example with htop), you could see that npm install command is doing (if i remember correctly) git-index-pack commands for long, long time. My way was to revert the changes in plugin.xml back to CocoaPod way at build time. Because Cordova uses version installed to node_modules if there is one, i do the following before doing a cordova platform add/prepare:
plugin.xml can be modified either by a script changing the file automatically, or just by copying over a modified version of the plugin.xml over the official one. |
Thank you for this @faugusztin and sorry, I'm truly new to Mobile Dev't so I don't know what does or how Pods works. I'll let you know after performing your steps. |
|
Thank you so much @wf9a5m75 |
**I'm submitting a ...** (check one with "x") - [ ] question - [x] any problem or bug report
OS: (check one with "x")
cordova information: (run
$> cordova plugin list
)If you use
@ionic-native/google-maps
, please tell the package.json (only@ionic-native/core
and@ionic-native/google-maps
are fine mostly)Current behavior:
When I add cordova-plugin-googlemaps to my project that have Android & iOS platform, it installs normally to android but it freezes for ios when reaching Installing "cordova-plugin-googlemaps" for ios.
If I use --verbose, I found that it stops while installing the SDK from github by running the following command:
npm install https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk --production --save-exact
It's the first time I face such issue with cordova-plugin-googlemaps.
The text was updated successfully, but these errors were encountered: