Unable to install plugins (ETIMEDOUT)

I can not install any plugins at all, here’s the output:

cordova plugin add cordova-plugin-file
Fetching plugin "cordova-plugin-file" via plugin registry
info trying registry request attempt 1 at 3:53:12 AM
http GET http://registry.cordova.io/cordova-plugin-file
info retry will retry, error on last attempt: Error: connect ETIMEDOUT 50.17.177.14:80
info trying registry request attempt 2 at 3:55:30 AM
http GET http://registry.cordova.io/cordova-plugin-file
info retry will retry, error on last attempt: Error: connect ETIMEDOUT 50.17.177.14:80

Even from GitHub:

cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git
Fetching plugin "https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git" via git clone
Installing "cordova-plugin-file" for android
Fetching plugin "cordova-plugin-compat" via plugin registry
info trying registry request attempt 1 at 3:59:23 AM
http GET http://registry.cordova.io/cordova-plugin-compat
info retry will retry, error on last attempt: Error: connect ETIMEDOUT 50.17.177.14:80
info trying registry request attempt 2 at 4:01:41 AM
http GET http://registry.cordova.io/cordova-plugin-compat
info retry will retry, error on last attempt: Error: connect ETIMEDOUT 50.17.177.14:80
info trying registry request attempt 3 at 4:04:48 AM
http GET http://registry.cordova.io/cordova-plugin-compat
Failed to install 'cordova-plugin-file':Error: connect ETIMEDOUT 50.17.177.14:80
    at Object.exports._errnoException (util.js:870:11)
    at exports._exceptionWithHostPort (util.js:893:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)
Error: connect ETIMEDOUT 50.17.177.14:80
    at Object.exports._errnoException (util.js:870:11)
    at exports._exceptionWithHostPort (util.js:893:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)

Update your Ionic CLI, Remove all existing Cordova plugins, update cordova, add those plugins again

1 Like

Remove Platform and add it again

Your Cordova CLI install seems to be very old, the plugins have not been hosted on cordova.io for some time: http://cordova.apache.org/announcements/2015/04/21/plugins-release-and-move-to-npm.html

I did all three things you guys said, and it’s fixed. (I don’t know which one fixed it, pretty sure updating did)

I had some problems updating, I fixed the npm error and updated.

1 Like