oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.53k stars 2.71k forks source link

MissingSharp: Could not find Sharp. #9618

Open lanice opened 6 months ago

lanice commented 6 months ago

What version of Bun is running?

1.0.35

What platform is your computer?

Linux 6.8.0-zen1 x86_64 unknown

What steps can reproduce the bug?

I am using bun for an Astro project. When using the Image component from astro:assets, and open the page in the browser, I am getting the following error (and the image is not shown):

Could not process image request: 16 | export default "";
              ^
MissingSharp: Could not find Sharp. Please install Sharp (`sharp`) manually into your project or migrate to another image service.
      at new AstroError (:16:10)

12:07:34 [500] /_image 8ms

I installed sharp via bun install sharp:

bun install v1.0.35 (940448d6)

 + sharp@0.33.3

 6 packages installed [518.00ms]

The error persists. I am running the dev server with bunx --bun astro dev.

What is the expected behavior?

There should be no error, and the image should be shown.

What do you see instead?

Is see an error, and no image is shown.

Additional information

I know this issue was supposed to be fixed with #4549, but I am on the newest version of Bun, and it still/again is an issue.

Micnubinub commented 5 months ago

Also in 1.1.5

image