You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, this is a great library. However, Im having a bit of a problem when importing this to my recent project (common js) which uses https://github.com/song940/node-escpos.
So my current implementation of node-escpos uses an import like this
// my printer vendorId
const vendorId = '0x0483'
//my printer product id
const ProductId = '0x5743'
const escpos = require("escpos");
const device = new escpos.USB(vendorId, productId);
let printer = new escpos.Printer(device);
if (device != null) {
device.open(function () {
printer
.font("a")
.align("ct")
.style("bu")
.size(1, 1)
.text("Testing Printer")
.text("The quick brown fox jumps over the lazy dog")
.barcode("6611235132450000000000", "CODE93", {
height: 35,
width: 1,
})
.control("lf");
printer.cut();
printer.close();
}
}
Here is what I've tried so far on import
"use strict";
var _core = require("@node-escpos/core");
var _usbAdapter = _interopRequireDefault(require("@node-escpos/usb-adapter"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
here is the error message being rendered on the console
Hi, this is a great library. However, Im having a bit of a problem when importing this to my recent project (common js) which uses https://github.com/song940/node-escpos.
So my current implementation of node-escpos uses an import like this
Here is what I've tried so far on import
here is the error message being rendered on the console
The text was updated successfully, but these errors were encountered: