ULLAS MOHAN.V
ULLAS MOHAN.V

Reputation: 1531

Unable to install plugins in cordova project

Am facing a big issue : Unable to install the phonegap plugins in my cordova project.Actually it was working fine still yesterday.

Now whenever I try adding any cordova plugin using CLI in my cordova project. I get the following error;

D:\Projects\test cordova>cordova plugin add org.apache.cordova.network-information
Fetching plugin "org.apache.cordova.network-information" via plugin registry
npm http GET http://registry.cordova.io/org.apache.cordova.network-information
npm http 502 http://registry.cordova.io/org.apache.cordova.network-information
npm ERR! registry error parsing json

What is the actual problem? how can i resolve this? Please help me..

Upvotes: 3

Views: 784

Answers (2)

I'm also having the same issue. But when i tried the github version of the plugin, it still works. Why not try using this:

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

Upvotes: 2

Daniel Cheung
Daniel Cheung

Reputation: 4829

The solution is wait:

see this?:

npm http 502 http://registry.cordova.io/org.apache.cordova.network-information

http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#502

Error parsing file?:

npm ERR! registry error parsing json

It is because there is no file or valid formatted json files to parse.

The server hosting the files is temporarily down. You could choose to report the problem.

Upvotes: 4

Related Questions