Closed GuilhermeCouto closed 2 years ago
Same here. The new version of SerialPort too.
Library escpos
has package.json
dependencies defined without versions:
{
"optionalDependencies": {
"serialport": "*",
}
}
And escpos
is designed for serialport
version 9. And on 11 Dec 2021 there has been released serialport
version 10, which has some breaking changes.
Force serialport
library version 9.
1) Add to package.json
:
```json
{
... rest of file,
"resolutions": {
"escpos/serialport": "9.2.8"
}
}
```
2) Delete node_modules
and yarn.lock
.
3) Install all dependencies again by yarn
.
Hi everybody, I found a problem with printing on Serial ports.
Serialprinter updates and so or file adapter escpos-serialprinter must be updated too.
The error you got is TypeError: SerialPort is not a constructor
Thats because the constructor changed.
I fixed it by changing the line 16 and 17 to
If you could change the npm repo I will appreciate.