Skip to content

Critical Fixes for Linux/VS Code Container Environments (Segfaults & Entry point) #20

@Nielsplu

Description

@Nielsplu

hello

I've been testing cavemem in a VS Code Dev Container (Linux/Node 20) and encountered a few critical issues. Here is a summary of the fixes and workarounds applied to get it running:

  1. Binary Mismatch (better-sqlite3): Switching Node versions (from 18 to 20) caused a Segmentation Fault because the native bindings were out of sync. Running npm rebuild fixed the NMV mismatch (108 vs 115).

  2. ONNX Runtime Crash: In this specific Docker/musl environment, setting embedding.provider: "local" triggers a Segfault. Setting it to "none" was necessary to prevent the crash.

  3. Main Entry Point Bug: In the bundled index.js, the dynamic import of the server module prevented main() from being called automatically as an entry point. I had to explicitly export and invoke main() to get the MCP server to respond to Claude Code.

Environment:

  • OS: Linux (VS Code Dev Container)
  • Node version: v20.x (previously v18.x)
  • Cavemem version: 0.1.3

Thanks for this great tool! Hope these details help for the next release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions