ionic 3 npm install error - ionic-framework

I'm getting the following error when i run "npm install" inside my ionic project. I didn't get this error earlier. I even tried creating a new application using "ionic start myApp blank" command. Even then i get the same error while npm install is runing.
Please advice, is this due to something broken at ionic end, or could it be a fault in my pc?
By the way I'm using ionic 3.
npm WARN deprecated object-keys#0.2.0: Please update to the latest object-keys
npm ERR! Unexpected end of input at 1:19096
npm ERR! ctories":{},"dist":{"shasum":"518f921aeb0560aec7dcab2990b14cf6f3cce5d

Try "sudo npm install -g ionic"

Related

ionic can't serve project (exit code 13)

I'm a beginner of ionic. I download repo and couldn't start it.(I try npm install) I getting an exit code 13. How can I solve this problem.
try command
npm install #ionic/app-scripts#latest --save-dev
and update python to the latest version 3.9.4
Add a new script inside your package.json as lets say
"start": "ionic serve --port=8080"
Then run npm run start from the command line/terminal
what do you get?

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 3 Google Maps 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

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.