What happened
After upgrading from v0.17.0 to v0.19.0, the local embedding model (Xenova/all-MiniLM-L6-v2) fails to load on every 15-minute timer tick.
Error log
[magic-context] embedding model failed to load: Cannot find module 'C:\Users\13096.cache\opencode\packages@cortexkit\opencode-magic-context@latest\node_modules@huggingface\transformers\dist\transformers.node.mjs' imported from C:\Users\13096.cache\opencode\packages@cortexkit\opencode-magic-context@latest\node_modules@cortexkit\opencode-magic-context\dist\index.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '...transformers.node.mjs'
What I expected
Embedding model loads normally as it did in v0.17.0.
Repro steps
- Upgrade MC plugin from v0.17.0 to v0.19.0 via doctor --force + restart OpenCode Desktop
- Check magic-context.log — embedding fails every 15 minutes on timer tick
- The file transformers.node.mjs exists on disk at the specified path, but Node.js ESM resolver cannot find it
Environment
- OpenCode Desktop v1.14.33 (Electron 34.3.0, Node ABI 145)
- Windows 11
- MC v0.19.0 (plugin cache)
- @huggingface/transformers v4.2.0
- Embedding config: local (Xenova/all-MiniLM-L6-v2 bundled)
Notes
- Doctor check passes 14/14 (config-level check only)
- All other MC features work fine (transform, historian, dreamer, ctx_reduce)
- The file exists on disk — this appears to be an ESM module resolution issue specific to Electron environment
What happened
After upgrading from v0.17.0 to v0.19.0, the local embedding model (Xenova/all-MiniLM-L6-v2) fails to load on every 15-minute timer tick.
Error log
[magic-context] embedding model failed to load: Cannot find module 'C:\Users\13096.cache\opencode\packages@cortexkit\opencode-magic-context@latest\node_modules@huggingface\transformers\dist\transformers.node.mjs' imported from C:\Users\13096.cache\opencode\packages@cortexkit\opencode-magic-context@latest\node_modules@cortexkit\opencode-magic-context\dist\index.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '...transformers.node.mjs'
What I expected
Embedding model loads normally as it did in v0.17.0.
Repro steps
Environment
Notes