I try this plugin
ionic cordova plugin add cordova-plugin-contacts
npm install --save @ionic-native/contacts
from https://ionicframework.com/docs/native/contacts
but i got error like this:-
> cordova plugin add cordova-plugin-contacts --save
Error: Failed to fetch plugin cordova-plugin-contacts@3.0.1 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 1 Error output:
npm WARN deprecated cordova-plugin-contacts@3.0.1: This plugin has been deprecat
ed
npm ERR! Unexpected token / in JSON at position 3928
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\PC\AppData\Roaming\npm-cache\_logs\2018-02-08T07_01_29_529
Z-debug.log
[ERROR] An error occurred while running cordova plugin add
cordova-plugin-contacts --save (exit code 1).
not working
error comes
Error: Failed to fetch plugin https://github.com/apache/cordova-plugin-contacts.
git 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 1 Error output:
npm ERR! Unexpected token / in JSON at position 3928
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\PC\AppData\Roaming\npm-cache\_logs\2018-02-08T09_29_48_661
Z-debug.log
cordova plugin add org.apache.cordova.contacts --nofetch
The cordova 7 uses the npm to install the plugins, and probably your npm is
not globally installed, or misconfigured.
When i run beloaw command:-
cordova plugin add org.apache.cordova.contacts --nofetch
Error:-
Error: Registry returned 404 for GET on https://registry.npmjs.org/org.apache.co
rdova.contacts
send info of your ionic project
ionic info
cli packages:
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : not installed
local packages:
@ionic/app-scripts : 1.3.7
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.4.2
System:
Android SDK Tools : 26.1.1
Node : v6.10.3
npm : 5.3.0
OS : Windows 7
Environment Variables:
ANDROID_HOME : D:\Android\sdk
Misc:
backend : pro
android platform remove and then install plugin
ionic cordova plugin add cordova-plugin-contacts
cli packages:
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 1.3.7
Cordova Platforms : none
Ionic Framework : ionic-angular 3.4.2
System:
Android SDK Tools : 26.1.1
Node : v6.10.3
npm : 5.3.0
OS : Windows 7
Environment Variables:
ANDROID_HOME : D:\Android\sdk
Misc:
backend : pro
after i remove platform i run this command:-
ionic cordova plugin add cordova-plugin-contacts
error:-
> cordova plugin add cordova-plugin-contacts --save
Error: Failed to fetch plugin cordova-plugin-contacts@3.0.1 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 1 Error output:
npm WARN deprecated cordova-plugin-contacts@3.0.1: This plugin has been deprecat
ed
npm ERR! Unexpected token / in JSON at position 3928
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\PC\AppData\Roaming\npm-cache\_logs\2018-02-08T09_53_11_927
Z-debug.log
[ERROR] An error occurred while running cordova plugin add
cordova-plugin-contacts --save (exit code 1).
check in your project
first remove contacts plugin from your project and again install that plugin
check is it working?
i think it will not work
because cordova team removed this plugin
see here:-
https://cordova.apache.org/news/2017/11/27/Deprecation-of-cordova-contacts-plugin.html
This means that the Cordova development community will not be doing any more work on this plugin.
You can continue to use this plugin as-is in existing and new applications
but any further issues will not be fixed by the Cordova team.
Yes
but now i am not able to install plugin
please suggest me