Skip to content

sharp on nixOS #266

@ManUtopiK

Description

@ManUtopiK

Environment

nixOS
node : v23.11.00

Reproduction

Install @nuxt/image in nuxt project on nixOS.

Describe the bug

Hi!
When using '@nuxt/image', it doesn't work has expected and can't generate the website.
If i go to http://localhost:3000/_ipx/_/og-nuxt.png for example, I got this error :

{
["error"](http://localhost:3000/_ipx/_/og-nuxt.png): {
"message": "[500] [IPX_ERROR] Something went wrong installing the "sharp" module Cannot find module '../build/Release/sharp-linux-x64.node' Require stack: - /home/manu/Sites/unpress/templates/nuxt-layer/node_modules/.pnpm/sharp@0.32.6/node_modules/sharp/lib/sharp.js - /home/manu/Sites/unpress/templates/nuxt-layer/node_modules/.pnpm/sharp@0.32.6/node_modules/sharp/lib/constructor.js - /home/manu/Sites/unpress/templates/nuxt-layer/node_modules/.pnpm/sharp@0.32.6/node_modules/sharp/lib/index.js Possible solutions: - Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp" - Install for the current linux-x64 runtime: "npm install --platform=linux --arch=x64 sharp" - Consult the installation documentation: https://sharp.pixelplumbing.com/install"
}
}

I have to explicitly install sharp via pnpm add sharp and run pnpm approve-builds to get ipx running correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions