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

Thermal Printer package issue #169

Open
NooberMe opened this issue Oct 8, 2023 · 3 comments
Open

Thermal Printer package issue #169

NooberMe opened this issue Oct 8, 2023 · 3 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@NooberMe
Copy link

NooberMe commented Oct 8, 2023

Describe the bug

when i try to use any thermal printer package this buffer issue come out,
Uncaught Error: Dynamic require of "buffer" is not supported , when i try to install react-thermal-printer/electron-pos-printer
To Reproduce
Install any thermal printer package like electron-pos-printer

image

@NooberMe NooberMe added the bug Something isn't working label Oct 8, 2023
@NooberMe
Copy link
Author

NooberMe commented Oct 8, 2023

I also tried to use 16.20.1 node version and latest version of node 18.17 but still have that error.

@jooy2
Copy link
Owner

jooy2 commented Oct 12, 2023

Hello, thank you for using Retron template!

I don't know much about the electron-pos-printer module, but I've seen a lot of installation issues registered as GitHub Issues.
Can you determine if this module is working properly in the latest electron environment?

Also, here are some speculative causes:

  1. Retron is optimized for ESM and you may need to use import instead of require.
  2. some modules should be run in the Main process instead of running in the Renderer process.

If you're still experiencing issues, I'd like you to share a simple Electron project that I can reproduce.

Regards,

@jooy2 jooy2 added help wanted Extra attention is needed and removed bug Something isn't working labels Oct 12, 2023
@NooberMe
Copy link
Author

hi, thank you for your response,

I also try some of thermal printer package and still have error in "Dynamic require", and in my code i didnt use require, the issue came from node modules. im almost 80% of my project but im looking forward to find out how to fix the "Dynamic require"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants