-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
fix(packaging): sharp missing from optionalDependencies — image attachment processing fails on fresh install #83401
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Fresh
npm i -g openclawdoes not installsharp, causing browser screenshot image resize and media-understanding image ops to fail with:Root Cause
extensions/media-understanding-core/image-ops.ts:57dynamically importssharpand throws when it's missing. However,sharpis not declared inpackage.jsonunderdependencies,optionalDependencies, orpeerDependencies. Sonpm installnever installs it.Users currently have to manually run:
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm i sharp@0.34.5 --no-save --prefix $(dirname $(realpath $(which openclaw)))/..Suggested Fix
Add
sharptooptionalDependenciesin rootpackage.json:"optionalDependencies": { + "sharp": "^0.34.5", "sqlite-vec": "0.1.9" }Using
optionalDependencies(notdependencies) because:sqlite-vecEnvironment
extensions/media-understanding-core/image-ops.ts