Error Adding Cordova Plugin From Git Repo


In trying to upgrade my project to Meteor 1.2 on mobile i’ve run into an issue converting the plugin repo urls over.

To add a cordova plugin from a git repo Meteor documentation says:

meteor add cordova:com.phonegap.plugins.facebookconnect@

So I tried that with a plugin I was currently using before Meteor 1.2 which is here: Which adding it should give me:

meteor add

However when I build for android / ios I get an error that it couldn’t be found or the plugin spec is incorrect. The weird thing is when I go back and look at the plugin added via meteor list I see: (Without the prepending slash which indicated which commit to checkout).

And indeed if I go back to look at how cordova-update was built, which comes from a git repo, meteors console looks like:

Adding plugin to Cordova project
% Fetching plugin “” via git clone
% Repository “” checked out to git ref “16c53f53e438fc8b1b9c768de36f0a8974e38b49”.

While the error’d plugin looks like:

Adding plugin to Cordova project
% Fetching plugin “” via npm
npm ERR! addLocal Could not install /var/folders/tb/gj5sy97j7pg4bvmwnmjgtb_w0000gn/T/npm-58241-5b415895/git-cache-1f2262f3ade3/4421fffe9d3feba07c081dfd6c20c815ba81deb9
% Fetching plugin “” via cordova plugins registry
npm ERR! addLocal Could not install /var/folders/tb/gj5sy97j7pg4bvmwnmjgtb_w0000gn/T/npm-58241-5b415895/git-cache-e6bfe0ada6c4/4421fffe9d3feba07c081dfd6c20c815ba81deb9
=> Errors executing Cordova commands:

While adding plugin to Cordova project:
Cordova error: CordovaError: Failed to fetch plugin via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: EISDIR, read

Notice it didnt try and fetch the specific commit. What gives.


Hmmm, confirmed this is a bug. Unfortunately, directly adding a Cordova plugin (meteor add) with a Git URL doesn’t work because the part after # will be removed when reading cordova-plugins. As this bug does not affect plugin dependencies in packages specified using Cordova.depends, a workaround is to create a local package.

A fix should be in the next point release.



Yep you are correct. Cordova.depends works that way just fine. I actually found a work around to this for the command line. I noticed that Meteor automatically tried to convert all my cordova git urls to the new format. If you go back and remove the offending plugins with the bad git urls and then re-add them with the old style git urls they still work.

For instance

meteor add

Still works for now.


As of version, the tarball URL no longer works. I’m seeing this error:

➜ 5:08PM ma-cordova git:(develop) ✗ meteor add
Added Cordova plugin
➜ 5:27PM ma-cordova git:(develop) ✗ meteor run ios
[[[[[ ~/dev/mobile-approvals/ma-cordova ]]]]]

=> Started proxy.
=> Started MongoDB.
=> Errors prevented startup:

While installing Cordova plugins:
error: Meteor no longer supports installing Cordova plugins from arbitrary tarball URLs. You can either add a
plugin from a Git URL with a SHA reference, or from a local path. (Attempting to install from

=> Your application has errors. Waiting for file change.


Ah yes, I forgot. I actually added them to the .meteor/cordova-plugins file directly. I didn’t go through meteor add [plugin].


I was able to add them using meteor add.

First, I cloned the git project under myapp/private folder. It’s important it’s private otherwise Meteor will pick-up the www/*.js files and try to compile like normal causing other issues (e.g., “module” or “require” is not defined).

Second, use the following command to add them to your project:

meteor add

This will them to the cordova-plugins directory along with the other bits they add.


Thanks! I was having the same problem and this seemed to do the trick to get it to run at least (doesn’t work for me yet, but that’s up next).


@martijnwalraven cool. Is there an early release we could test this with?


This should be fixed in the current release, Meteor


@martijnwalraven thanks. I am running


So do you mean you still have issues with this?


Yes. The error I mentioned before.

Adam Ginsburg
tel: +61 411 151 732


Could you elaborate on this? What error specifically do you encounter with, and what seems to trigger it?


@martijnwalraven oops, was answering via email… too many threads :wink: please see this for details:


Ok, I responded on the linked issue.