webtoon / psd

Fast zero-dependency PSD parser for the web and Node.js

Home Page:https://webtoon.github.io/psd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node composite error

younseunghyun opened this issue · comments

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

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)