The barcode scanner code will not work outside the supported environments (iOS devices and Android devices, according to the plugin page).
Wrap environment specific code like the one inside barcodescanner.js in environment check tags. For example:
if (WL.Client.getEnvironment() === "android") {
//barcodescanner.js and other code that should only run on android
}
Also, try replacing in barcodescanner.js:
var exec = require("cordova/exec")
with:
var exec = cordova.exec
or:
Try an older version of the plugin like 0.7.2, notice the use of cordova.define
to provide the require
function, instead of expecting the require
global function to magically exist.