-
Notifications
You must be signed in to change notification settings - Fork 11
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
Page cannot access when use "esc-pos-encoder-ionic" #8
Comments
Have you defined the socket? Please refer to https://github.com/Ans0n-Ti0/esc-pos-encoder-ionic-demo/blob/main/EscPosDemo/src/app/tab3/tab3.page.ts |
Yes. I declare socket like these code. import { BluetoothSerial } from '@ionic-native/bluetooth-serial/ngx'; declare var BTPrinter: any; POSPrint(){
} If I comment like this. It can run normally. |
@KApoNG21 someone has the same problem as you, have you declared socket? https://github.com/NielsLeenheer/EscPosEncoder/issues/29#issuecomment-723554803 |
Hi, I try to use "esc-pos-encoder-ionic" NPM package in my Ionic project.
When I try to open the page which use the service contains the imported library I have this error:
ERROR Error: Uncaught (in promise): ReferenceError: Cannot access 'HomePageModule' before initialization
ReferenceError: Cannot access 'HomePageModule' before initialization
Related code:
import EscPosEncoder from 'esc-pos-encoder-ionic';
//----
createTicket(){
const encoder = new EscPosEncoder();
const result = encoder.initialize();
}
The text was updated successfully, but these errors were encountered: