You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: Sharp 0.35 fails in dev after external symlink targets dist directory #4511
When trigger dev processes a task importing sharp@0.35.3, automatic external detection creates the generated worker's node_modules/sharp symlink pointing to Sharp's dist directory instead of its package root.
This bypasses Sharp's root package.json, which defines its dist/index.mjs and dist/index.cjs entry points. Node consequently looks for sharp/index.js, which does not exist, and task indexing fails with ERR_MODULE_NOT_FOUND.
Importing the same Sharp installation directly outside Trigger.dev works correctly.
Expected behavior: the task is indexed and the local worker becomes ready.
git clone http://github.com/benpixel/trigger-sharp-035-repro.git
cd trigger-sharp-035-repro
pnpm install
Authenticate the Trigger.dev CLI and provide a valid project ref:
TRIGGER_PROJECT_REF=proj_your_project_ref pnpm dev
Task indexing fails with:
Error: Could not import trigger/sharp-task.ts
Error: Cannot find package '.../node_modules/sharp/index.js'
imported from '.../trigger/sharp-task.mjs'
Did you mean to import "sharp/dist/index.cjs"?
Additional information
Confirmed with:
trigger.dev@4.5.9
@trigger.dev/sdk@4.5.9
sharp@0.35.3
Node.js 24.15.0
pnpm 11.10.0
The generated symlink was inspected while trigger dev was running:
Hi! I'd like to work on this issue if it's still available. I've been able to understand the reported behavior and would like to investigate the root cause and submit a fix.
If that's okay, could you please assign this issue to me? Thanks!
Trigger.dev team: I can deliver this as one fixed paid compatibility slot: JPY 5,000, within 24 hours of a go, payment after an accepted PR. Scope is limited to reproducing the Sharp 0.35 package-root mis-resolution, correcting external symlink target selection without breaking other exports layouts, and focused regression coverage using the supplied repro—no unrelated build refactor. There is currently no matching open PR. If useful, reply go; otherwise no action is needed.
Activity
7430souvik commentedon Aug 6, 2026
Hi! I'd like to work on this issue if it's still available. I've been able to understand the reported behavior and would like to investigate the root cause and submit a fix.
If that's okay, could you please assign this issue to me? Thanks!
AInoAKARI commentedon Aug 9, 2026
Trigger.dev team: I can deliver this as one fixed paid compatibility slot: JPY 5,000, within 24 hours of a
go, payment after an accepted PR. Scope is limited to reproducing the Sharp 0.35 package-root mis-resolution, correcting external symlink target selection without breaking other exports layouts, and focused regression coverage using the supplied repro—no unrelated build refactor. There is currently no matching open PR. If useful, replygo; otherwise no action is needed.