@Vartex05 wrote:
Hi, iam working on App, which uses bluetooth printer to print bills. To get bill printed with correct diacritics, i need to encode it to correct coddepage. This can be done with this iconv-lite library, but iam not able to get it work.
I succesfully installed it, imported it in my printerService and try to run ionic serve, i get the following error:
core.js:6014 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'isEncoding' of undefined TypeError: Cannot read property 'isEncoding' of undefined at Object../node_modules/string_decoder/lib/string_decoder.js (string_decoder.js:29) at __webpack_require__ (bootstrap:84) at Object../node_modules/iconv-lite/encodings/internal.js (internal.js:49) at __webpack_require__ (bootstrap:84) at Object../node_modules/iconv-lite/encodings/index.js (index.js:6) at __webpack_require__ (bootstrap:84) at Object.getCodec (index.js:65) at Object.getEncoder (index.js:117) at Object.encode (index.js:22) at PrintService.testEncode (print.service.ts:26) at resolvePromise (zone-evergreen.js:797) at zone-evergreen.js:862 at ZoneDelegate.invokeTask (zone-evergreen.js:391) at Object.onInvokeTask (core.js:39680) at ZoneDelegate.invokeTask (zone-evergreen.js:390) at Zone.runTask (zone-evergreen.js:168) at drainMicroTaskQueue (zone-evergreen.js:559) at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:469) at invokeTask (zone-evergreen.js:1603) at HTMLElement.globalZoneAwareCallback (zone-evergreen.js:1629)
When i tried to run it on device, i get this error when i try to enter page, to which is printService injected -
ERROR Error: Uncaught (in promise): Error: Runtime compiler is not loaded Error: Runtime compiler is not loaded
I get same errors even when i tried to use this ESC POS ionic library - https://github.com/Ans0n-Ti0/EscPosEncoder(with difference, that the error when i run ionic serve says “Unknown Codepage” even if iam entering correct codepage like cp852)
Any ideas how to solve this? iam using ionic 5 and angular 8.
Posts: 1
Participants: 1