Open jmrg-link opened 2 years ago
I think the issue is being caused by the utils.inherit()
which is deprecated. I fixed this by copying all the code in the escpos-usb
module into a file, commenting out that part, then requiring that file instead.
this is because escpos-usb
has a wildcard dependency on usb
, which means it's pulling in versions with breaking changes it's not compatible with. with recent versions of npm you can fix this by adding a version override for usb
to your package.json
:
"overrides": {
"usb": "1.8.8"
}
you can try : usb.usb.on ...
Was the same problem. @apaleslimghost solution helps.
Fixed on #429
Error line usb.on comment line . Printer not init . escpos-usb -> index line comments / usb.on('detach', function(device){ if(device == self.device) { self.emit('detach' , device); self.emit('disconnect', device); self.device = null; } }); /