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

ReferenceError: require is not defined #104

Closed
xsstomy opened this issue Jul 17, 2023 · 5 comments · Fixed by #105
Closed

ReferenceError: require is not defined #104

xsstomy opened this issue Jul 17, 2023 · 5 comments · Fixed by #105

Comments

@xsstomy
Copy link

xsstomy commented Jul 17, 2023

image

image

node 16

how can i fix this ?

windows os

thank you

@papandreou
Copy link
Owner

I have no idea what you're trying to do. Please provide actual reproduction steps.

@xsstomy
Copy link
Author

xsstomy commented Jul 19, 2023

i found that the pngquant binary is not in my PATH.

image

when i use this function ,error above

@papandreou
Copy link
Owner

@ubermanu seems to understand what the problem is. I've published 4.2.0 with the fix, could you try with that?

@xsstomy
Copy link
Author

xsstomy commented Jul 21, 2023

image

image

new error

@papandreou

@ubermanu
Copy link
Contributor

Somehow i had the same issue, but managed to make it work using a compact quality arg:

new PngQuant([192, "--quality=60-80", "--nofs", "-"])

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

Successfully merging a pull request may close this issue.

3 participants