Plugin with different branch

I use cordova-plugin-ble-central that has some issues with Bluetooth Permissions on Android, so they develope a branch to solve this that you can install by:

cordova plugin add cordova-plugin-ble-central@slim

How can I specify that @slim on config.xml? Or is there any other way on Volt?

Thanks

For plugins to work, they need to be registered in npm. That plugin doesn’t come up on a search. Are you sure you have the right name?

Yes, this is the url cordova-plugin-ble-central - npm
And you can see the @slim specification here cordova-plugin-ble-central - npm

Thanks for your reply, I’ll be waiting for some advice.

I think you need to contact the maintainer of the repo.

cordova-plugin-ble-central@slim is not set up in npm. There is is no https://github.com/don/cordova-plugin-ble-central@slim in GIthub.

I found that the correct spec was 1.7.0-slim in here cordova-plugin-ble-central - npm and here we have the url cordova-plugin-ble-central - npm

Sorry about this simple question, but I can’t make it work with this spec

<plugin name="cordova-plugin-bluetooth-serial" spec="1.7.0-slim" />

Is this possible?

Thanks for your help

Would you submit your job once more? I’d like to watch the log this time.

Thanks for looking at this!!

The failed error shows: Failed to fetch plugin cordova-plugin-splashscreen@6.0.1 but if I change

<plugin name="cordova-plugin-bluetooth-serial" spec="1.7.0-slim" />

for this

<plugin name="cordova-plugin-bluetooth-serial" />

It compiles without problem.


This is the log link: https://apps.volt.build/7d10183d-8189-4a41-9446-69c7f5906d9a/voltbuilder.log

And this is what the screen shows:

UserError: Error: CordovaError: Failed to fetch plugin cordova-plugin-splashscreen@6.0.1 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: Error: Command failed with exit code 1: npm install cordova-plugin-splashscreen@6.0.1 --save-dev
npm ERR! code ETARGET
npm ERR! notarget No matching version found for cordova-plugin-bluetooth-serial@1.7.0-slim.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-07-26T18_35_42_345Z-debug-0.log
Discovered plugin "cordova-plugin-bluetooth-serial". Adding it to the project
Failed to restore plugin "cordova-plugin-bluetooth-serial". You might need to try adding it again. Error: CordovaError: Failed to fetch plugin cordova-plugin-bluetooth-serial@1.7.0-slim via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: Error: Command failed with exit code 1: npm install cordova-plugin-bluetooth-serial@1.7.0-slim --save-dev
npm ERR! code ETARGET
npm ERR! notarget No matching version found for cordova-plugin-bluetooth-serial@1.7.0-slim.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-07-26T18_35_43_938Z-debug-0.log
Discovered plugin "cordova-plugin-androidx-adapter". Adding it to the project
Failed to restore plugin "cordova-plugin-androidx-adapter". You might need to try adding it again. Error: CordovaError: Failed to fetch plugin cordova-plugin-androidx-adapter via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: Error: Command failed with exit code 1: npm install cordova-plugin-androidx-adapter --save-dev
npm ERR! code ETARGET
npm ERR! notarget No matching version found for cordova-plugin-bluetooth-serial@1.7.0-slim.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-07-26T18_35_45_558Z-debug-0.log
Discovered plugin "cordova-plugin-x-socialsharing-android12". Adding it to the project
Failed to restore plugin "cordova-plugin-x-socialsharing-android12". You might need to try adding it again. Error: CordovaError: Failed to fetch plugin cordova-plugin-x-socialsharing-android12 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: Error: Command failed with exit code 1: npm install cordova-plugin-x-socialsharing-android12 --save-dev
npm ERR! code ETARGET
npm ERR! notarget No matching version found for cordova-plugin-bluetooth-serial@1.7.0-slim.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-07-26T18_35_47_213Z-debug-0.lo
This could be caused by a problem with a different plugin. 

I think you might have your plugins mixed up.

The latest version of cordova-plugin-bluetooth-serial is “1.4.3”.

If you’re thinking of “1.7.0-slim”, that’s for cordova-plugin-ble-central.

There’s no such thing as “1.7.0-slim” for cordova-plugin-bluetooth-serial.

I can’t believe I miss that!

Sorry for making you look at this when it was so simple and THANKS A LOT!!!

Sometimes it just takes another set of eyes. :slightly_smiling_face:

1 Like