sharp fails to load: missing trustedDependencies in package.json
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 74/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- bun
- Lĩnh vực
- tooling
Hướng nghiên cứu
Mở plugins/macrodata/package.json và kiểm tra cấu hình dependency của nó, sau đó đọc về hành vi trustedDependencies của Bun. Chạy bun install trong plugin và xác minh rằng binary native của sharp khả dụng để công cụ search_memory tải thành công trên môi trường được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
search_memory (and any tool that triggers @xenova/transformers → sharp) fails with:
Cannot find module '../build/Release/sharp-darwin-arm64v8.node'
from '/Users/.../.bun/install/cache/sharp@0.32.6@@@1/lib/sharp.js'
This happens because sharp@0.32.6 has a postinstall script that compiles/downloads the native binary, but bun skips postinstall scripts by default unless the package is listed in trustedDependencies.
Since macrodata uses bun as its runtime and package manager, the native binary is never built, and sharp fails at runtime.
Fix
Add trustedDependencies to plugins/macrodata/package.json:
"trustedDependencies": [
"sharp"
]
Then bun install will run sharp's install script and the native binary will be available.
Workaround
Until this is fixed upstream, users can manually patch their cached copy:
# Find the cached plugin
cd ~/.claude/plugins/cache/macrodata/macrodata/<version>/
# Add trustedDependencies to package.json (before devDependencies)
# "trustedDependencies": ["sharp"]
# Reinstall
rm -rf node_modules/sharp
bun install
# May also need to copy the binary to bun's global cache:
mkdir -p ~/.bun/install/cache/sharp@0.32.6@@@1/build/Release
cp node_modules/sharp/build/Release/sharp-darwin-arm64v8.node \
~/.bun/install/cache/sharp@0.32.6@@@1/build/Release/
# Restart Claude Code to reload the MCP server
Environment
- macOS (darwin-arm64)
- bun 1.3.9
- macrodata 0.1.3
- sharp 0.32.6 (transitive via
@xenova/transformers)
- Ngôn ngữ chính
- TypeScript
- Star
- 119
- Fork
- 6
- Merge trung bình
- 1 giờ 32 phút
- Pull request đã merge (30 ngày)
- 2
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ascorbic/macrodata
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Support Cursor Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Tất cả issue của ascorbic/macrodata
Issue tương tự
-
Browser Waiting for: Product Owner
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
getsentry/sentry-javascript#24577 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
agilepathway/label-checker#640 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
copse-dev/agent-pane#2953 ·
-
[aw] Upgrade available Đang mởagentic-workflows
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
anomalyco/models.dev#7701 ·