image icon indicating copy to clipboard operation
image copied to clipboard

Sharp module causes error with PNPM. need to manually over ride to older sharp version

Open bananacity opened this issue 5 months ago • 1 comments

Hi,

I've seen a lot of people run into this error myself included when using nuxt image with pnpm.

  "error": {
    "message": "[500] [IPX_ERROR] \nSomething went wrong installing the "sharp" module\n\nCannot find module '../build/Release/sharp-darwin-arm64v8.node'\nRequire stack:\n- ....
}

the solution is to override the sharp version to v0.33.4 which fixes it.

"pnpm": {
    "overrides": {
      "sharp": "0.33.4"
    },
  },

bananacity avatar Jun 18 '25 11:06 bananacity

Worked for me, thank you

gbendjaf avatar Jun 18 '25 13:06 gbendjaf

Same for bun, I used :

{
"overrides": {
    "sharp": "0.33.4"
  }
}

Thanks a lot!

copostic avatar Aug 11 '25 11:08 copostic

Can confirm that: "@nuxt/image": "2.0.0-alpha.1" with

"overrides": {
  "sharp": "0.33.4",
}

worked for me!

nathanchase avatar Aug 31 '25 13:08 nathanchase