发布

  • fix(mcp): use Module._initPaths() for global npm resolution

    frostbyte_neo 发布于 2026-01-28 09:46:43 +00:00

    The previous approach (module.globalPaths.push) didn't work because
    Node.js caches module paths at startup. The fix is to:

    1. Set process.env.NODE_PATH to the global npm root
    2. Call Module._initPaths() to force re-initialization

    Also fixed python_repl path resolution for CJS context by adding
    fallback from import.meta.url to __dirname.

    Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

    下载附件