How to use cordova plug-in in Meteor


#1

I am attempting to use the Canvas2ImagePlugin found at Canvas2ImagePlugin

I can add this to the project using

meteor add cordova:https://github.com/devgeeks/Canvas2ImagePlugin

However, when I try to run ios or android I get

While adding plugin https://github.com/devgeeks/Canvas2ImagePlugin.git@0.6.0 to     Cordova project:
Cordova error: Failed to fetch plugin    https://github.com/devgeeks/Canvas2ImagePlugin.git@0.6.0 via git.
Either there is a connection problems, or plugin spec is incorrect:
Error: git: Command failed with exit code 128 Error output:
Cloning into '/var/folders/xr/8h56qbxd0xngtwf4bnqsdlj00000gn/T/git/1448252409964'...
fatal: unable to access 'https://github.com/devgeeks/Canvas2ImagePlugin.git@0.6.0/': The requested URL returned error: 400

Any words of wisdom are greatly appreciated.

Thank you


#2

I get an error message (‘Meteor requires either an exact version …’) when I do this:

meteor add cordova:https://github.com/devgeeks/Canvas2ImagePlugin

Although adding a version should not be allowed for a Git URL, this is accepted:

meteor add cordova:https://github.com/devgeeks/Canvas2ImagePlugin@0.6.0

Thanks for reporting this! This needs te be fixed, so I opened an issue.

In your case, the proper way to do this is to use the SHA of the commit you want to add as part of the URL:

meteor add cordova:org.devgeeks.Canvas2ImagePlugin@https://github.com/devgeeks/Canvas2ImagePlugin.git#aeeba79916ab932d8cb2b30096d97eaf7542c206

#3

Thanks and yes I had used the second way with @0.6.0
(late night bleary eyed desperation post)