How to add cordova plugin from local file system?


#1

I tried to used:
meteor add cordova:file:///Users/apple/git/cordova-plugin-ihealth-bp@0.0.1

It can added cordova plugin, but It did not run .
How do I add cordova plugin from local file system to meteor project?

Sincerely.


#2

What is the purpose of your project? Are you going to make a Meteor cordova app but not using the build-in Camera, GPS plugin but a new plugin made by yourself?


#3

I used meteor develop android app and need to used android bluetooth api In my project . I used cordova to build a plugin. it work well. But I don’t know how to add my plugin to my Meteor project. I used:
meteor add cordova:file:///Users/apple/git/cordova-plugin-ihealth-bp@0.0.1.

The terminal show:
simple-todos apple$ meteor run android-device
Error while running for mobile platforms: Error running
/Users/apple/.meteor/packages/meteor-tool/.1.1.3.7747zc++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/cordova-scripts/cordova.sh
npm ERR! addLocal Could not install
file:///Users/apple/git/cordova-plugin-ihealth-bp@0.0.1
Error: ENOENT, stat 'file:///Users/apple/git/cordova-plugin-ihealth-bp@0.0.1

Fetching plugin “file:///Users/apple/git/cordova-plugin-ihealth-bp@0.0.1” via plugin
registry


#4

It’s not just you - I ran into the same problem and ended up altering the Meteor source to get it working. It’s incredibly frustrating, as if meteor developers don’t also develop cordova plugins?


#5

I just commit the corodva plugin to my github, and meteor project add the plugin from github.


#6

This is fine if you’re not actively developing the plugin.

When I tried that I wasn’t able to just set a general git address, instead I had to use the raw tarball URL (which I understand is only valid for one specific commit). Is that your experience with it as well, or has it changed now?


#7

fully agree. Meteor potential is there but the build system needs some work. Example trick we have to do to speed up command with npm script or mup which the only deployment mechanism but is a black box difficult to debug and requires root access