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

I can't figure out how to use this with NextJS #93

Open
ahmadyusufcodes opened this issue Jan 26, 2025 · 1 comment
Open

I can't figure out how to use this with NextJS #93

ahmadyusufcodes opened this issue Jan 26, 2025 · 1 comment

Comments

@ahmadyusufcodes
Copy link

Hi @seokju-na, I've tried many other packages but I'm strugling to get this working with NextJS.
Any help? cuz the usage examples are not helping, how do I print?

Thank you

@ahmadyusufcodes
Copy link
Author

And I get this error all time

` ⨯ file:///Users/mac/Desktop/Work/DevMinds/rumbu/rumbu-web/node_modules/@react-thermal-printer/printer/dist/index.mjs:185
import { encode as _encode } from "iconv-lite";
^^^^^^
SyntaxError: Named export 'encode' not found. The requested module 'iconv-lite' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'iconv-lite';
const { encode: _encode } = pkg;

at ModuleJob._instantiate (node:internal/modules/esm/module_job:177:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:260:5)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:543:26) {

page: '/dashboard/tools/pos'
}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant