Help us improve
Share bugs, ideas, or general feedback.
From cloudflare-macos-fix
Fix sharp native module installation failure on macOS Apple Silicon when setting up Cloudflare Workers projects using wrangler. Use when the user encounters "sharp", "wrangler install", "pnpm install" errors on macOS arm64/Apple Silicon with Node v25+, or when setting up a new Cloudflare Workers project on macOS. Trigger on keywords: "sharp", "wrangler", "cloudflare workers setup", "native module", "darwin-arm64", "prebuilt binary", "node-gyp", "ABI mismatch".
npx claudepluginhub jaeyeom/claude-toolbox --plugin cloudflare-macos-fixHow this skill is triggered — by the user, by Claude, or both
Slash command
/cloudflare-macos-fix:cloudflare-macos-fixThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The `sharp` package (transitive dependency of `wrangler`) fails to install on
Deploys Next.js apps to Cloudflare Workers using OpenNext Cloudflare adapter. Supports SSR, ISR, App/Pages Router; handles worker size limits, runtime compatibility, connection scoping, and Cloudflare service integrations.
Reviews and authors Cloudflare Workers code against production best practices. Useful for writing new Workers, reviewing code, configuring wrangler.jsonc, and checking for anti-patterns.
Deploys Python to Cloudflare Workers with Pyodide, FastAPI integration, Containers for heavy compute/AI, service bindings, using wrangler configs, Dockerfiles, and pywrangler CLI.
Share bugs, ideas, or general feedback.
The sharp package (transitive dependency of wrangler) fails to install on
macOS Apple Silicon (darwin-arm64) with Node v25+. Sharp 0.34.x ships prebuilt
binaries that have an ABI mismatch with Node v25's native .node files.
Typical error symptoms:
sharp install fails during pnpm install / npm installdarwin-arm64node-gyp rebuild failures for sharpAdd to package.json:
"pnpm": {
"overrides": {
"sharp": "0.33.5"
}
}
For npm, use overrides at the top level instead:
"overrides": {
"sharp": "0.33.5"
}
.npmrc with platform-specific binary configCreate or update .npmrc:
shamefully-hoist=true
supportedArchitectures.os=current
supportedArchitectures.cpu=current
supportedArchitectures.libc=current
This tells pnpm to download prebuilt native binaries matching the current platform only.
node-addon-api as a devDependencypnpm add -D node-addon-api@^8.3.1
Fallback so sharp can compile from source if prebuilt binaries aren't available.
rm -rf node_modules pnpm-lock.yaml
pnpm install
sharp as transitive dependency via wrangler