Ed Schembor
Ed Schembor

Reputation: 8560

Error using cordova CLI to search or add plugins

I am using Cordova version 3.4.0-0.1.3 on Windows and using the command-line interface (CLI). I have successfully built a simple test app and run in the Android emulator. But when I now try to add a plugin to my app, I receive an error. Even trying to search for a plugin fails. I am afraid that there is a problem since I am behind a corporate firewall - but I set the proxy, http-proxy and https-proxy settings. Also, I am not clear as to whether I need a git command line interface also installed (I don't believe this is required).

When I run, for example, "cordova plugin search device", I receive the error:

Error: connect ECONNREFUSED at errnoException (net.js:904:11) at Object.afterConnect [as oncomplete] (net.js:895:19)

And when I try to install a plugin using, for example, "cordova plugin add org.apache.cordova.device", this fails with:

Fetching plugin "org.apache.cordova.device" via plugin registry Error: Failed to fetch package information for org.apache.cordova.device at C:\Users\xxx\AppData\Roaming\npm\node_modules\cordova\node_modules\plug man\src\registry\registry.js:32:20 at Request.cb [as _callback] (C:\Users\71476\AppData\Roaming\npm\node_module s\cordova\node_modules\plugman\src\registry\registry.js:251:9) at self.callback (C:\Users\71476\AppData\Roaming\npm\node_modules\cordova\no de_modules\plugman\node_modules\request\index.js:148:22) at Request.EventEmitter.emit (events.js:117:20) at ClientRequest.self.clientErrorHandler (C:\Users\71476\AppData\Roaming\npm \node_modules\cordova\node_modules\plugman\node_modules\request\index.js:257:10)

at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1547:9)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:415:13)

Is there any way to verify that the proxy setting is correct? Any ideas what else I can check for?

Upvotes: 2

Views: 1290

Answers (1)

Nurdin
Nurdin

Reputation: 23893

try remove and add it back.

cordova plugin
cordova plugin rm org.apache.cordova.device
cordova plugin add org.apache.cordova.device

Upvotes: 0

Related Questions