错误信息
MCP error -32000: Connection closed npm error code ENOENT npm error syscall lstat npm error path D:\install\nvm\v20.19.0\node_global npm error errno -4058 npm error enoent ENOENT: no such file or directory, lstat 'D:\install\nvm\v20.19.0\node_global' npm error enoent This is related to npm not being able to find a file. npm error enoent npm notice npm notice New major version of npm available! 10.8.2 -> 11.7.0 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.7.0 npm notice To update run: npm install -g npm@11.7.0 npm notice npm error A complete log of this run can be found in: D:\install\nodejs\node_cache\_logs\2026-01-09T11_07_29_945Z-debug-0.log
解决方案
因为之前用的nvm切了一下node版本,导致找不到node_global文件,需要在切换后的node版本目录下新建一个文件夹node_global
