Ionic 2 - Background Mode not install


#1

When I install background mode from the command line then I get error. Like,

Afrozas-MacBook-Pro:ionic2test afroza$ ionic plugin add de.appplant.cordova.plugin.background-mode

Fetching plugin “de.appplant.cordova.plugin.background-mode” via cordova plugins registry

info
trying registry request attempt 1 at 4:11:52 AM
http GET http://registry.cordova.io/de.appplant.cordova.plugin.background-mode

info
retry will retry, error on last attempt: Error: connect ETIMEDOUT 50.17.177.14:80

info
trying registry request attempt 2 at 4:13:17 AM
http GET http://registry.cordova.io/de.appplant.cordova.plugin.background-mode

info
retry will retry, error on last attempt: Error: connect ETIMEDOUT 50.17.177.14:80

info
trying registry request attempt 3 at 4:15:33 AM
http
GET http://registry.cordova.io/de.appplant.cordova.plugin.background-mode

Fetching from cordova plugins registry failed: connect ETIMEDOUT 50.17.177.14:80

Fetching plugin “de.appplant.cordova.plugin.background-mode” via npm

info
trying registry request attempt 1 at 4:16:48 AM
http GET https://registry.npmjs.org/de.appplant.cordova.plugin.background-mode

http
404 https://registry.npmjs.org/de.appplant.cordova.plugin.background-mode

TypeError: Cannot read property ‘latest’ of undefined
at next (/usr/local/lib/node_modules/cordova/node_modules/npm/lib/cache.js:687:35)
at /usr/local/lib/node_modules/cordova/node_modules/npm/lib/cache.js:675:5
at saved (/usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/npm-registry-client/lib/get.js:142:7)
at /usr/local/lib/node_modules/cordova/node_modules/npm/node_modules/graceful-fs/polyfills.js:133:7
at FSReqWrap.oncomplete (fs.js:82:15)

Caught exception:
undefined

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

what kind of a problem is this that I faced?


#2

try with
cordova plugin add https://github.com/katzer/cordova-plugin-background-mode.git