2

(Using Cordova 6.0.0)

I have the following plugin definition in my config.xml:

<plugin name="cordova-plugin-device" spec="~1.1.0"/>

When I try to install my android platform, I receive the following error:

npm http GET http://registry.cordova.io/cordova-plugin-device
Fetching from npm failed: connect ETIMEDOUT

When I checked the website, it is indeed down - there's nothing there - and the cordova repository mentioned in the documentation is plugins.cordova.io.

What is the problem? Should I redirect the cordova repository somewhere else somehow?

3 Answers 3

3

Update: Cordova has moved their plugins to npm now. Check the below link:

http://cordova.apache.org/announcements/2015/04/21/plugins-release-and-move-to-npm.html

1

I did a workaround by entering the full github repository address eg: cordova plugin add "https://github.com/apache/cordova-plugin-media". It also requires that git is installed with its environment variable set.

But when I do the "platform add" command it does look for registry.cordova.io

So another workaround was needed: I downloaded the git repo of the plugin on my local hard drive in a folder different than my cordova project. In the repository of the plugin I edited the plugin.xml file by commenting all the tags repo and dependency as follow:

<!--repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-compat.git</repo-->      <!--dependency id="cordova-plugin-file" version="^4.0.0" />
    <dependency id="cordova-plugin-compat" version="^1.0.0" /-->

Of course I needed to do the same process (download localy and edit plugin.xml file) for the plugin describe in the dependency tag.

Then I've installed the plugin from my local path and it worked (like: cordova plugin add "myPath/cordova-plugin-media").

-1

there is possibility that u r using some secure internet line (like company network ) which causing problem try some other network

1
  • this should be comment not answer
    – shareef
    Dec 21, 2017 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.