0
votes

I have created a fresh ionic 3 application and tried to install https://github.com/apache/cordova-plugin-network-information plugin to the application. I executed below command:

ionic cordova plugin add https://github.com/apache/cordova-plugin-network-information.git

This didn't install the plugin. Instead, it shows

(node:14784) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Failed to fetch plugin https://github.com/apache/cordova-plugin-network-information.git via registry. Probably this is either a connection problem, or plugin spec is incorrect.

Any idea? or suggestions what's going on? I have tried installing other native plugins like device plugin has the same issue.

2
Have you tried doing ionic cordova plugin add cordova-plugin-network-information? - BShaps
Yes. I tried both ways - Aruna

2 Answers

0
votes

Finally, I was able to sort out the issue. credits to @Brass. I uninstalled node, ionic and cordova. After that, Installed Node.js latest version. Also executed

npm cache clean -f
npm install -g cordova ionic

Hope this will helpful for someone else too.

Cheer!

-1
votes

Have you tried following the Ionic docs? https://ionicframework.com/docs/native/network/

ionic cordova plugin add cordova-plugin-network-information
npm install --save @ionic-native/network