I'm trying to build an application that communicates with a barcode-scanner. So i chose node-hid, my problem is upon putting an event listener on a device, my application freezes.
This is my code sample
const HID = require('node-hid');
const device = new HID.HID(4400, 1);
device.on("data", (data)=>{
console.log(data);
})
I'm using webpack as my bundler
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…