-
Notifications
You must be signed in to change notification settings - Fork 16
Error: com.tns.NativeScriptException: Failed to find module: "./workers/enable-bluetooth", relative to: app// #20
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
Comments
facing the same issue. any update regarding this? |
in hprt.android.js file on method Hprt.prototype.enableBluetooth the issue is getting generated from below mentioned line. its not getting the worker file while its there in the nativescript-hprt/workers folder
|
@subhojit-me @Mauoanel Did you guys follow docs? https://github.com/krushkamx/nativescript-hprt#working-with-workers it looks like there is webpack config missing, so your app is not copying files to the device |
Hi @davorpeic after reading the docs, did these steps to use workers.
dont know the the dot: false can be an isue or not |
@subhojit-me Can you try adding |
@davorpeic Would like to share that version 0.9.6 works fine. |
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone, I'm trying to use a thermal printer but I keep on getting the below error.
The application can connect to the bluetooth printer.
I've also installed other applications from the playstore on my phone just to see if I can print on the thermal printer and they all can print however, when I use this lib, my application cannot print.
I have created a folder under *project/src/app/workers and also created files(enable-bluetooth.js, connect-printer.js)
JS: Error Error: com.tns.NativeScriptException: Failed to find module: "./workers/enable-bluetooth", relative to: app//
JS: Printer found = {
JS: "portName": "A0:E6:F8:34:1E:99",
JS: "modelName": "XX706*"
JS: }
JS: Connect error Error: com.tns.NativeScriptException: Failed to find module: "./workers/connect-printer", relative to: app//
JS: ERROR Error: Uncaught (in promise): Error: java.lang.NullPointerException: Attempt to invoke interface method 'int HPRTAndroidSDK.IPort.WriteData(byte[], int)' on a null object reference
JS: push.../node_modules/nativescript-hprt/hprt.js.Hprt.horizontalLine(file: node_modules/nativescript-hprt/hprt.android.js:204:0)
JS: at webpackHotUpdate../app/home/home.component.ts.HomeComponent.printText(file: src/app/home/home.component.ts:138:18)
JS: at webpackHotUpdate../app/home/home.component.ts.HomeComponent.connect(file: src/app/home/home.component.ts:79:13)
JS: at HomeComponent(file: src/app/home/home.component.ts:63:13)
JS: at createClass(file: node_modules/@angular/core/fesm5/core.js:21158:0)
JS: at createDirectiveInstance(file: node_modules/@angular/core/fesm5/core.js:21027:0)
JS: at createViewNodes(file: node_modules/@angular/core/fesm5/core.js:29387:0)
The text was updated successfully, but these errors were encountered: