[BUG] Claude Code v2.1.21 broke NVM

Resolved 💬 5 comments Opened Jan 30, 2026 by mattwiseowlautomation Closed Feb 28, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Two days ago Claude Code extension update, MCP tools stopped working with syntax errors about "Unexpected token '.'".

The problem: The new version spawns shells that don't pick up nvm, so it uses your system Node (v12 in my case) instead of nvm-managed Node (v20). MCP packages require Node 14+ for optional chaining syntax.
What didn't work:

Adding nvm init to ~/.profile

Adding nvm init before the interactive guard in ~/.bashrc

Setting terminal.integrated.env.linux PATH in VSCode settings

The new extension seems to ignore all of these.

The fix: Roll back the extension.

What Should Happen?

Stop Claude Code from using Node 12

Error Messages/Logs

Steps to Reproduce

This morning I attempted to update to 2.1.25 and the same issue.

I asked Claude "what version of node are you using?"

It replies:

Bash Check Node.js version
IN
node --version

OUT
v12.22.9

I roll back to 2.1.20

I asked Claude "what version of node are you using?"

It replies:

Bash Check Node.js version
IN
node --version

OUT
v20.19.0

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.25

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

<img width="1920" height="1053" alt="Image" src="https://github.com/user-attachments/assets/518faf6b-39a5-455e-b356-47263b506e18" />
<img width="1920" height="1053" alt="Image" src="https://github.com/user-attachments/assets/794154dd-586e-4682-878e-ac8b98459149" />

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗