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

node composite error #49

Open
younseunghyun opened this issue Sep 8, 2022 · 1 comment
Open

node composite error #49

younseunghyun opened this issue Sep 8, 2022 · 1 comment
Assignees
Labels
type: bug Something isn't working

Comments

@younseunghyun
Copy link

hi
I'm trying to use this library at server.

When I try to composite psd files, atob reference error is occured.

Also when I change atob to buffer, below error is occured.
TypeError: WebAssembly.instantiate(): Import #0 module="./webtoon_psd_decoder_bg.js" error: module is not an object or functiom

How can I use composite?

Thankyou

@pastelmind
Copy link
Collaborator

pastelmind commented Sep 27, 2022

Hello! I believe you are using Node.js < v16. Currently, our bundle uses atob() (which was added in Node v16) to decode the embedded WebAssembly module. This code is emitted by vite-plugin-wasm v1.0.0.

We have since upgraded to a newer version of vite-plugin-wasm, which uses Buffer.from() when possible. This will make our bundle compatible with older versions of Node.js. It's also much faster than atob()!

We have yet to publish a new version containing the fix. I'm aiming to make a new release within a week, however, so please be patient! 🏃

(also see #37)

@pastelmind pastelmind self-assigned this Sep 27, 2022
@pastelmind pastelmind added the type: bug Something isn't working label Sep 27, 2022
@pastelmind pastelmind added this to the Release v0.3.0 milestone Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants