Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: byte = ''; ^ SyntaxError: Unexpected token = at Module._compile (internal/modules/cjs/loader.js:723:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) #434

Open
khaing17 opened this issue Aug 28, 2024 · 2 comments
Labels

Comments

@khaing17
Copy link

Description of the bug

every time i run the node script, i get this error
`byte = '';
^

SyntaxError: Unexpected token =
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/home/superuser/Desktop/work/thermal_printer_example/node_modules/escpos/index.js:12:18)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
`

Steps To Reproduce

this is my code
`const escpos = require("escpos");

// escpos.Bluetooth = require('escpos-bluetooth');
escpos.USB = require("escpos-usb");
escpos.SerialPort = require("escpos-serialport");
const serialDeviceOnLinux = new escpos.SerialPort("/dev/usb/lp2", {
baudRate: 14400,
stopBit: 2,
});

console.log(serialDeviceOnLinux);
`

Additional Information

No response

@khaing17 khaing17 added the bug label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@khaing17 and others