sharp fails to load: missing trustedDependencies in package.json
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- bun
- Domain
- tooling
Research direction
Open plugins/macrodata/package.json and inspect its dependency configuration, then read Bun's trustedDependencies behavior. Run bun install in the plugin and verify that sharp's native binary is available so the search_memory tool loads successfully on the reported environment.
Written by the indexing model from the issue text.
Description
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)
- Dominant language
- TypeScript
- Stars
- 119
- Forks
- 6
- Avg merge
- 1h 32m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ascorbic/macrodata
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Support Cursor Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in ascorbic/macrodata
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100