Ionic 3 Google Maps Plugins - plugins

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

I was having the same problem and seemed to be an issue with the repro. It is now working nicely if you follow the ionic-native documentation:
https://ionicframework.com/docs/native/google-maps/
$ ionic cordova plugin add cordova-plugin-googlemaps --variable
API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable
API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"
$ npm install --save #ionic-native/google-maps

Related

Cordova plugin geolocation not getting installed

I am developing an ionic 4 application. I want to add geolocation plugin and use "ionic cordova plugin add cordova-plugin-geolocation" for the same. On executing the commandI get error
cordova.cmd plugin add cordova-plugin-geolocation
npm: Command failed with exit code 1 Error output:
npm ERR! code E400
npm ERR! 400 Bad Request - GET https://registry.npmjs.org/cordova-plugin-geolocation
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\username\AppData\Roaming\npm-cache\_logs\2019-09-10T08_17_48_727Z-debug.log
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd plugin add cordova-plugin-geolocation exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Can you use below commands from you ionic project directory
ionic cordova plugin add cordova-plugin-geolocation
npm install #ionic-native/geolocation

Ionic CLI V4 Looks like #ionic/v1-toolkit isn't installed in this project

After updating Ionic CLI to 4, every command I try to run does not working.
For example:
Ionic serve,
ionic cordova build android
ionic cordova run android
ionic cordova build ios
...
I receive such errors:
Looks like #ionic/v1-toolkit isn't installed in this project.
Then I try to install the package as they ask:
? Install #ionic/v1-toolkit? Yes
> npm i -D -E #ionic/v1-toolkit
But I get the following error in return:
npm WARN rsdemo.razwebs.co.il#1.1.1 No repository field.
npm WARN rsdemo.razwebs.co.il#1.1.1 No license field.
npm ERR! Cannot read property '0' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/razbuchnik/.npm/_logs/2018-08-17T05_49_32_425Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm i -D -E #ionic/v1-toolkit exited with exit code 1.
Re-running this command with the --verbose flag may provide more
information.
net.js:705
throw new errors.TypeError('ERR_INVALID_ARG_TYPE',
^
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be one of type string or Buffer. Received type object
at WriteStream.Socket.write (net.js:705:11)
at process.<anonymous> (/usr/local/lib/node_modules/ionic/bin/ionic:9:63)
at process.emit (events.js:159:13)
at emitPendingUnhandledRejections (internal/process/promises.js:94:22)
at runMicrotasksCallback (internal/process/next_tick.js:124:9)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
How to solve this issue?
Try to delete node_modules directory and npm i again

Ionic Live Update (App Update Plugin)

I tried to implement this plugin and feature on my project but the documentation is too poor, and all the tutorials on internet are using a Cordova Hot Code Push plugin.
Unfortunately the installation of Cordova Hot Code Push CLI client, used by every single tutorial on internet about it, keeps getting an error on:
cordova hot code push error postinstall
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngrok#2.3.0 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ngrok#2.3.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/midias14/.npm/_logs/2018-06-06T19_45_57_204Z-debug.log
And not being able to resolve, I'm trying to implement hard way.
Any help on doing by hand?
I'm on Ionic3, Ubuntu sys.
I had similar issue yesterday. Try install the plugin with flag --unsafe-perm=true.

Ionic App Version

I can't install ionic native App Version.
When I write "ionic cordova plugin add cordova-plugin-app-version" shows next message:
How can I fix it??
λ ionic cordova plugin add cordova-plugin-app-version
> cordova plugin add cordova-plugin-app-version --save
× Running command - failed!
[ERROR] An error occurred while running cordova plugin add cordova-plugin-app-version --save (exit code 1):
Error: Failed to fetch plugin cordova-plugin-app-version 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\Xu\Documents\github\rheumaiq_app\node_modules\es6-promise-plugin\package.json
npm ERR! code ELOOP
npm ERR! errno -4067
npm ERR! syscall open
npm ERR! ELOOP: too many symbolic links encountered, open
'C:\Users\Xu\Documents\github\rheumaiq_app\node_modules\es6-promise-plugin\package.json'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Xu\AppData\Roaming\npm-cache\_logs\2017-10-18T14_44_39_797Z-debug.log
UPDATE:
Thanks a lot!!
But the problem is not App Version, is with es6-promise-plugin in node_modules.
package.json
...
"es6-promise-plugin": "file:node_modules/es6-promise-plugin",
...
this folder is empty, I dont know what I have to do.
You have a typo
Here is how it should be
cordova plugin add cordova-plugin-appversion
Your mistake most likely results from the github repo being
https://github.com/Rareloop/cordova-plugin-app-version
But npm version name differs from the git repo name.
You can try cordovas --nofetch option to work around problems like this since cordova 7.0.0:
cordova plugin add cordova-plugin-appversion --nofetch
See the release notes for cordova 7.0.0 here to read more about the --nofetch mode.
The problem is not that it is empty, the problem is that it is a symbolic link that points to itself and therefore does not work. A loop is created.
If you delete the folder node_modules/es6-promise-plugin you will see that it is created again each time you type npm install...
I have seen this efect occurs adding the android platform, when try to do it for the cordova-plugin-x-socialsharing plugin, with the 5.2.1 version.
With the v5.2.0 that does not happen.
You can change your version:
ionic cordova plugin remove cordova-plugin-x-socialsharing --force
ionic cordova plugin add cordova-plugin-x-socialsharing#5.2.0 --force
Or you can change in your package.json the version to use.

Issus Ionic Cordova platform add IOS

ionic Cordova platform and IOS
✖ Cordova platform adds ios --save - failed!
[ERROR] Exception: Using Cordova-fetch for Cordova-ios#^4.4.0
Error: Failed to fetch platform `cordova-ios#^4.4.0`
Probably this is either a connection problem or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 254 Error output:
npm ERR! path
/Users/zion/Desktop/RSSFeederApp/node_modules/node_modules/file:cordova-dist-dev/CB-11690/cordova-common-1.4.1.tgz
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall stat
npm ERR! enoent ENOENT: no such file or directory, stat
'/Users/zion/Desktop/RSSFeederApp/node_modules/node_modules/file:cordova-dist-dev/CB-11690/cordova-common-1.4.1.tgz'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/zion/.npm/_logs/2017-08-31T07_48_01_154Z-debug.log
This issue is related to npm 5.3.0.
It is best to downgrade to 5.2.0 using npm install -g npm#5.2.0
For us this is most commonly caused by npm's broken lockfile approach.
To resolve it, delete the package-lock.json and run your command again.
try this, and make sure you are using Mac
ionic platform add ios