Skip to content

[bug]: Sharp build fails with mise due to missing node-gyp #8503

@sheikhlimon

Description

@sheikhlimon

Describe the bug

When using mise to manage Node (20.5.1) and pnpm (9.x), sharp fails to build because node-gyp is not present in the environment. This prevents postinstall scripts from completing. The issue does not occur when using NVM, because npm globally provides node-gyp.

Optional suggestion:

Consider adding node-gyp as a devDependency to ensure builds work in mise and other isolated Node environments.

Affected component/components

sharp (dependency)

How to reproduce

  1. Clone the repo: git clone https://github.com/shadcn/ui.git
  2. Navigate to repo: cd ui
  3. Install dependencies: pnpm install
  4. Run workspace: pnpm --filter=www dev

Codesandbox/StackBlitz link

No response

Logs

sh: line 1: node-gyp: command not found

System Info

OS: Omarchy 3.0.2 (Arch Linux)
Node: 20.5.1 via mise
PNPM: 9.x
npm: not used globally

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions