how to install ionic capacitor contact native plugin - ionic-framework

When i try to install "npm install #awesome-cordova-plugins/contacts" in ionic 6, am getting error as follows
npm ERR! 404 Not Found - GET https://registry.npmjs.org/#awesome-cordova-plugins%2fcontacts - Not found
npm ERR! 404
npm ERR! 404 '#awesome-cordova-plugins/contacts#*' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url. ```
how can i resolve this issue. same issue is happening for uid also.

According to the cordova-contacts-plugin repo here, the cordova-contacts-plugin is deprecated since Nov 27, 2017.
As there is deprecation notice on it's npm repository.
The plugin that is currently in the ionic docs is abandoned but it seems like ionic docs is not updated since then.

I think u have to use this one now:
https://github.com/capacitor-community/contacts
https://www.npmjs.com/package/#capacitor-community/contacts

After installing dependencies you need to sync
ionic cap sync
then run your project. you see no error and successfully run
for more info about this plugin click here

You can install the individual cordova plugins (like contacts) with with #ionic-native/contacts and cordova-plugin-contacts

Related

Get npm error npm ERR! 404 '#my-package#2.0.0' is not in this registry when try to publish new npm package version to npm

I get below npm error when trying to publish a new version of my package to npm.
The package is 'public' and previously published by someone else.
updated code and merged to master
run npm version major and merged package.json and package-lock.json to master
npm login
npm publish
I get below error:
npm notice Publishing to https://registry.npmjs.org/ npm ERR! code
E404 npm ERR! 404 Not Found - PUT
https://registry.npmjs.org/#my-package - Not found npm ERR! 404 npm
ERR! 404 '#my-package#2.0.0' is not in this registry.
I received a 404 until I provided a repository field in package.json when publishing to Github Packages. Unhelpful error.

How to solve npm ERR_SOCKET_TIMEOUT error when creating react app?

I use npx create-react-app to boot strap my project. Installation process crashes with:
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
npm ERR! network Invalid response body while trying to fetch https://registry.npmjs.org/#babel%2fhelper-compilation-targets: Socket timeout
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
I open that url with the Chrome browser and it works just fine:
How do I solve this problem?
I had the same error.
The solution was to change the definition of the timeout.
It worked for me like a charm ✨
For changing the timeout,
Run these two commands:
npm config set fetch-retry-mintimeout 20000
npm config set fetch-retry-maxtimeout 120000
I hope this helps.
tnsaturday. Recently I also faced a similar problem as you. I solved this problem by simply uninstalling the latest node.js version which is 17.5.0 and installing 16.14.0 LTS. So, if you installed the latest version of the node then shift back to the previous version. I hope in this way you can solve your problem.

Why material-ui install / update return an error?

i was updating the core library to latest version but npm return an error
npm ERR! code E401
npm ERR! 401 Unauthorized: #material-ui/core#latest
anyone have the same issue?
thanks!
i removed the .npmrc file from my home dir and it works

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.