Environment
- OS: Windows 10/11 x64
- Runtime: Node.js / OpenCode built-in
- Plugin version: v2.14.3
- sharp version: 0.34.5
Problem
On Windows, the plugin loads successfully and the web UI starts at http://127.0.0.1:4747, but the memory tool always returns "Memory system is initializing." and never becomes ready.
Log file: ~/.opencode-mem/opencode-mem.log
Failed to initialize embedding model: {"error":"Error:
Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp-win32-x64.node' from
'C:\Users<user>.cache\opencode\packages\opencode-mem@latest\node_modules\sharp\lib\sharp.js'
Root Cause
sharp is a transitive dependency (via @xenova/transformers). When OpenCode auto-downloads the plugin to ~/.cache/opencode/packages/, the sharp native binary for Windows x64 is not installed correctly. The @img/sharp-win32-x64 optional dependency is not resolved.
Workaround
Manually install the platform-specific binary in the cache directory:
cd ~/.cache/opencode/packages/opencode-mem@latest
npm install @img/sharp-win32-x64
After this, restart OpenCode and the memory system initializes correctly.
Suggestion
- Add a Windows installation note in the README (Prerequisites or Getting Started section)
- Consider adding @img/sharp-win32-x64 (and other platform binaries) as direct dependencies instead of relying on optional dependency resolution, since OpenCode's plugin loader may skip optional deps
- Or handle the sharp initialization failure gracefully with a clearer error message pointing to the fix
Logs
--- Session started: 2026-06-05T00:40:07.087Z ---
[2026-06-05T00:40:07.088Z] Failed to initialize embedding model: {"error":"Error: \nSomething went wrong installing the "sharp" module\n\nCannot find module '../build/Release/sharp-win32-x64.node'"}
[2026-06-05T00:40:07.092Z] Plugin warmup failed: {"error":"Error: ..."}
Environment
Problem
On Windows, the plugin loads successfully and the web UI starts at http://127.0.0.1:4747, but the memory tool always returns "Memory system is initializing." and never becomes ready.
Log file: ~/.opencode-mem/opencode-mem.log
Failed to initialize embedding model: {"error":"Error:
Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp-win32-x64.node' from
'C:\Users<user>.cache\opencode\packages\opencode-mem@latest\node_modules\sharp\lib\sharp.js'
Root Cause
sharp is a transitive dependency (via @xenova/transformers). When OpenCode auto-downloads the plugin to ~/.cache/opencode/packages/, the sharp native binary for Windows x64 is not installed correctly. The @img/sharp-win32-x64 optional dependency is not resolved.
Workaround
Manually install the platform-specific binary in the cache directory:
cd ~/.cache/opencode/packages/opencode-mem@latest
npm install @img/sharp-win32-x64
After this, restart OpenCode and the memory system initializes correctly.
Suggestion
Logs
--- Session started: 2026-06-05T00:40:07.087Z ---
[2026-06-05T00:40:07.088Z] Failed to initialize embedding model: {"error":"Error: \nSomething went wrong installing the "sharp" module\n\nCannot find module '../build/Release/sharp-win32-x64.node'"}
[2026-06-05T00:40:07.092Z] Plugin warmup failed: {"error":"Error: ..."}