Open tkem opened 7 years ago
Hello,
The real one is https://www.npmjs.com/package/cordovarduino
, the other one was a fork
I hope to see your project soon!
Regards
Thanks for the fast response! Will convert to cordovarduino
then, though I had some problems with the Ionic 2 CLI installing the plugin (haven't looked into this any further, will re-investigate if that's an Ionic or user issue). On a personal note, I also prefer the name cordova-plugin-serial
, since it sounds more like other Cordova plugins.
I close this issue, feel free to reopen it if needed.
May I kindly suggest that you reconsider publishing this as cordova-plugin-serial
? The current situation, well, just sucks ;-)
Especially annoying is that cordovarduino
somehow resolves to fr.drangies.cordova.serial
, and gets saved as such in config.xml
:
<plugin name="fr.drangies.cordova.serial" spec="~0.0.7"/>
but
$ cordova plugin add fr.drangies.cordova.serial
Error: Registry returned 404 for GET on https://registry.npmjs.org/fr.drangies.cordova.serial
So it's not possible to build a project from scratch using the saved plugin information in config.xml
. I use a number of other plugins, and none of them gives me these headaches... So please, please, please, try to clean up this mess!
PR welcome ;)
And as stated in the readme, this plugin is installed by cordova plugin add cordovarduino
.
And be sure with this negative attitude I won't do a damn thing about this issue.
Also, I cannot publish it as cordova-serial-plugin
since I don't have the ownership.
The "mess" (a working plugin, actually) ain't mine.
Sorry if this came across the wrong way, no offense meant! Let me assure you that I'm very thankful that this project even exists! However, the issue here (which took me quite some time to figure out, so please forgive me if I sounded too rude - didn't mean to) is simply this:
Running
cordova plugin add cordovarduino --save
puts the follwing in my config.xml
:
<plugin name="fr.drangies.cordova.serial" spec="~0.0.7" />
Now, when I do a fresh checkout and run
cordova platform add android
all plugins saved to config.xml
are downloaded and installed automatically - except cordovarduino
, which gives me
Discovered plugin "fr.drangies.cordova.serial" in config.xml. Adding it to the project
Fetching plugin "fr.drangies.cordova.serial@~0.0.7" via npm
Failed to restore plugin "fr.drangies.cordova.serial" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin fr.drangies.cordova.serial@~0.0.7 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: Registry returned 404 for GET on https://registry.npmjs.org/fr.drangies.cordova.serial
since it's obviously not registered with its ID.
To add insult to injury, cordova doesn't stop on the error, but continues fetching the other plugins, so the error message quickly scrolls out of view (sure not your fault, and probably warrants an issue with cordova itself).
However, using a plugin ID different from the npm package name does seem to trigger some unexpected behavior, at least when saving/restoring plugin information to/from config.xml
, and also seems to be uncommon with other plugins. So may I kindly suggest you consider using the package name for the plugin ID, too, if this doesn't introduce any compatibility issues.
Ok, I see the problem here, and indeed, it needs to be fixed!
The best I can do for now is change the id
in the config.xml
to cordovarduino
.
I agree cordova-serial-plugin
would be a better fit, but for that it would require that @randynwalsh give me the ownership of it on https://npmjs.org
Sorry for being harsh, I woke up grumpy!
Regards
Great, I guess changing the id
will do for now!
And no worries, I know that feeling ;-)
Maybe cordova-plugin-usb-serial
would be an alternative (similar to cordova-plugin-bluetooth-serial
)?
@xseignard could you look into changing the id in plugin.xml
and package.json
?
and
adding this plugin will alway change the project's `package.json´, adding this line:
"fr.drangies.cordova.serial": "~0.0.7",
and this breaks subsequent npm install
. I believe changing those two places would fix the issue.
guess what, @tkem, I stumbled upon the same issue. What a coincidence! :-D
First of all, thanks for this great plugin! Will post to #15 as soon as there's something to see ;-)
Looking for a USB/serial plugin for Android, I found both this [https://www.npmjs.com/package/cordovarduino] and
cordova-plugin-serial
[https://www.npmjs.com/package/cordova-plugin-serial], which seem to be very similar, except for version numbers and maintainers. So far, I've been usingcordova-plugin-serial
with my Ionic 2 app, but the link to its GitHub repo seems broken.So, you could please shed some light on this?