MCP server crashes because the client uses an old Node version
Claude DesktopCursor
The error
SyntaxError: Unexpected token '?' • ReferenceError: fetch is not defined • ERR_REQUIRE_ESM
Why it happens
With nvm installed, a GUI app may pick up an old system Node (e.g. v16) instead of your nvm default. Modern MCP servers need Node 18+ and often 20+.
How to fix it
- Check which Node the client sees
Temporarily set command tonodewith args["-v"]and read the log, or compare/usr/local/bin/node -vwithnode -v. - Point at a modern Node directly
Use the absolute npx path from your nvm version and put its bin folder first in PATH.{ "command": "/Users/you/.nvm/versions/node/v22.11.0/bin/npx", "args": ["-y", "@upstash/context7-mcp"], "env": { "PATH": "/Users/you/.nvm/versions/node/v22.11.0/bin:/usr/bin:/bin" } } - Or upgrade the system Node
Install a current LTS from nodejs.org so every app gets it.
Related servers
Docs & Knowledge● Maintained
Context7
Context7 Platform -- Up-to-date docs for AI agents
★ 63.1k · updated 2026-10-15 · 🔑 auth
Browser Automation● Maintained
Playwright (Microsoft)
Playwright MCP server
★ 38.2k · updated 2026-10-08
Browser Automation● Maintained
Chrome DevTools
Chrome DevTools for coding agents
★ 53.6k · updated 2026-10-15
Sources
- https://github.com/nvm-sh/nvm
- https://modelcontextprotocol.io/docs/develop/connect-local-servers
- crash: Cannot find package 'zod' imported from ~/.nvm/versions/node/v22.22.0/lib/node_modules/monomind/packages/@monomind/cli/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js (GitHub issue, 1 comments)
- MCP server fails with node version managers (fnm, nvm, volta) (GitHub issue, 1 comments)