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

loadImage stopped working in latest update (0.1.60) #935

Open
aidendotgg opened this issue Nov 8, 2024 · 4 comments
Open

loadImage stopped working in latest update (0.1.60) #935

aidendotgg opened this issue Nov 8, 2024 · 4 comments

Comments

@aidendotgg
Copy link

aidendotgg commented Nov 8, 2024

I am using the package under Bun v1.1.34 and loadImage has started throwing errors ever since version 0.1.60. 0.1.59 and all versions below work just fine.

102 |   return new Promise((resolve, reject) => {
103 |     const image = new Image()
104 |     if (typeof alt === 'string') image.alt = alt
105 |     image.onload = () => resolve(image)
106 |     image.onerror = (e) => reject(e)
107 |     image.src = src
          ^
error: Wrap finalizer for PromiseRaw failed
 code: "ObjectExpected"

      at /home/aiden/Projects/host_backend/node_modules/@napi-rs/canvas/load-image.js:107:5
      at new Promise (1:11)
      at createImage (/home/aiden/Projects/host_backend/node_modules/@napi-rs/canvas/load-image.js:102:10)
      at /home/aiden/Projects/host_backend/node_modules/@napi-rs/canvas/load-image.js:18:71
      at loadImage (/home/aiden/Projects/host_backend/node_modules/@napi-rs/canvas/load-image.js:16:43)
      at /home/aiden/Projects/host_backend/src/utils/borders/glow.ts:58:25
      at run (/home/aiden/Projects/host_backend/src/utils/borders/glow.ts:16:36)
      at /home/aiden/Projects/host_backend/src/utils/S3Engine.ts:34:93
@Brooooooklyn
Copy link
Owner

@aidendotgg you should fire a issue in the bun repo

@aidendotgg
Copy link
Author

@aidendotgg you should fire a issue in the bun repo

This is not a bun issue though. Version 0.1.59 and below of this package all work perfectly fine with bun but something that was changed in 0.1.60 broke it.

@twlite
Copy link
Contributor

twlite commented Nov 15, 2024

This is not a bun issue though. Version 0.1.59 and below of this package all work perfectly fine with bun but something that was changed in 0.1.60 broke it.

If it works on node but not in bun then it is a bug in bun

@RealFascinated
Copy link

0.1.59 works fine but later versions are broken on bun

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

4 participants