Software Archive
Read-only legacy content
17061 Discussions

Installing 3rd Party plugin without URL

Geoff_at_CFM
Beginner
387 Views

I'm using this plugin...

https://www.npmjs.com/package/cordova-plugin-indexeddb-async

As you can see there are two install options...

#Installation
Install via the Cordova CLI.
For Cordova CLI 4.x, use the GIT URL syntax:
cordova plugin add https://github.com/ABB-Austin/cordova-plugin-indexeddb-async.git

For Cordova CLI 5.x, use the new npm syntax:
cordova plugin add cordova-plugin-indexeddb-async

 

I can install the plugin by using the CLI 4.x URL, but how do I install using npm to get the CLI 5.x version?

TIA

0 Kudos
4 Replies
John_H_Intel2
Employee
387 Views

You can add that plugin using the Plugin Manager, just pick a third party plugin and then enter the git url in

https://github.com/ABB-Austin/cordova-plugin-indexeddb-async.git

01 Mar. 24 11.59.jpg

0 Kudos
PaulF_IntelCorp
Employee
387 Views

Or, choose the "Cordova plugin registry" option and use the package name > cordova-plugin-indexeddb-async

0 Kudos
Geoff_at_CFM
Beginner
387 Views

Thanks,

My point was that the page quoted above implies that there are TWO DIFFERENT VERSIONS of the plugin - is this not the case, and there are just two different install methods for the different CLI's?

When I go to the GIT repository it appears there is only one plugin - I installed it from there. I was just confused by the two different install methods in the original page.

0 Kudos
PaulF_IntelCorp
Employee
387 Views

The two sets of instructions are confusing. They exist because the older CLI 4.x system tries to pull from the now retired Cordova registry, so you have to add using the git repo address (if you're using Cordova CLI directly). The CLI 5.x (and 6.x) systems pull from the new Cordova registry, which is located in NPM. If you're using the XDK it doesn't matter, we have taken care of those problems.

One thing to note, some plugin authors will maintain multiple branches in their git repos to deal with special issues. I don't see that in this particular plugin's repo. It's generally safer to pull them from the NPM repo (new Cordova registry) because the git repos can be in an unknown state and you don't know what you're getting.

0 Kudos
Reply