-
fix(mcp): use Module._initPaths() for global npm resolution
发布于
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:- Set process.env.NODE_PATH to the global npm root
- 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
下载附件