I am trying to run demo from https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/master/demo both locally and online at https://play.nativescript.org/?template=pl
With Playground (online) Or Preview command (locally), You can not use plugin those require native dependency such as Barcode Scanner.
You will have to build the project using tns [run|build]
commands locally, only then the native dependencies will be installed and you will be able to run them successfully.