Search code examples
javascripthtmlcordovaphonegap-pluginscordova-3

Apache Cordova unable to load a plugin


I am trying to create an app using apache cordova , i struggled to install it. Finally, when everything worked just fine, i tried to add a plugin with this command :

C:\hello>cordova plugin add org.apache.cordova.console

then this message appears :

Fetching plugin "org.apache.cordova.console" via plugin registry

After a while an Error has appeared :

Error: Failed to fetch package information for org.apache.cordova.console
at C:\Users\pc\AppData\Roaming\npm\node_modules\cordova\node_modules\plugman
\src\registry\registry.js:32:20
at Request.cb [as _callback] (C:\Users\pc\AppData\Roaming\npm\node_modules\c
ordova\node_modules\plugman\src\registry\registry.js:251:9)
at self.callback (C:\Users\pc\AppData\Roaming\npm\node_modules\cordova\node_
modules\plugman\node_modules\request\index.js:148:22)
at Request.EventEmitter.emit (events.js:117:20)
at ClientRequest.self.clientErrorHandler (C:\Users\pc\AppData\Roaming\npm\no
de_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)   

Solution

  • Another simple way is

    1. download the plugin as zip from git
    2. extract the zip to some path
    3. run cordova plugin add cordova-plugin-splashscreen-master ( replace 'cordova-plugin-splashscreen-master' with your folder name )