Error on adding plugin


#1

I am trying to implement a QR code scanner, and upon adding this plugin

$ ionic cordova plugin add phonegap-plugin-barcodescanner

I am getting this following error.

Error: Failed to fetch plugin git+https://github.com/wildabeast/BarcodeScanner.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module

please help me thank you in advance.


#2

Please use this plugin, it is official on Cordova Documents.

cordova plugin add https://github.com/phonegap/phonegap-plugin-barcodescanner.git

ngCordova BarCodeScanner

you need to chec once that all methods you want to use in that plugin defines in ngCordova plugin doc.

Hope it helps you


#3

Don’t use ionic cordova both in command
$ ionic cordova plugin add phonegap-plugin-barcodescanner

Only write this command.
$ cordova plugin add phonegap-plugin-barcodescanner


#4

$ cordova plugin add phonegap-plugin-barcodescanner
I have tried the above command but same error I am getting


#5

That is strange.

ionic cordova plugin add phonegap-plugin-barcodescanner should not download the wildabeast plugin, but the newer one at https://github.com/phonegap/phonegap-plugin-barcodescanner.

Post your ionic info output please so we can learn a bit about your environment.


#6

That makes no difference as the first command literally executes the second one you posted.