[BUG] Claude Code 2.1.0 crashes on startup - Invalid Version semver parsing error
Resolved 💬 80 comments Opened Jan 7, 2026 by kelapure Closed Jan 8, 2026
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
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?
Claude Code 2.1.0 fails to launch with a semver parsing error. The application crashes immediately on startup with:
ERROR Invalid Version: 2.1.0 (2026-01-07)
Application crashes on startup before any UI is displayed. The semver validation fails because the version string contains a non-semver-compliant date suffix.
What Should Happen?
Claude Code should start normally.
Error Messages/Logs
## Root Cause
The version string `2.1.0 (2026-01-07)` includes a date in parentheses, which is not valid semver format. The semver library only accepts:
- Standard format: `2.1.0`
- Prerelease format: `2.1.0-beta.1`
The date suffix `(2026-01-07)` causes the semver parser to reject the version string entirely.
## Full Stack Trace
ERROR Invalid Version: 2.1.0 (2026-01-07)
TypeError: Invalid Version: 2.1.0 (2026-01-07)
at new Pw (file:///Users/[user]/.npm/_npx/[hash]/node_modules/@anthropic-ai/claude-code/cli.mjs:813:1565)
at kw (file:///Users/[user]/.npm/_npx/[hash]/node_modules/@anthropic-ai/claude-code/cli.mjs:813:1867)
at Dw (file:///Users/[user]/.npm/_npx/[hash]/node_modules/@anthropic-ai/claude-code/cli.mjs:813:ь2convey)
... [additional stack frames in bundled code]
Steps to Reproduce
- Update to Claude Code 2.1.0 (via auto-update or
npm install -g @anthropic-ai/claude-code@latest) - Run
claudein terminal - Application crashes immediately with semver error
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.76
Claude Code Version
2.1.0 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
Additional Context
This appears to be a release configuration issue where the version string was set to include a release date. The fix would be to either:
- Remove the date suffix from the version string
- Use semver-compliant prerelease format if date tracking is needed (e.g.,
2.1.0+20260107)
Labels (suggested)
bugarea:packagingpriority:critical
80 Comments
Same
same
+1
yep
+1
Same
ERROR LOG IN FULL
+1
+1
global productivity has halted...
+1
+1
Oof. +1
+1 dead currently
+1
same
+1
+1
+1
+1
same
+1
+1
+1
+1
pls dont make me touch grass
Same; broken, can't use at all. Blocker.
same
+1
870624fc1581a70590e382f263e2972b3f1e56f5 is the origin of the issue - the parser
if(this.raw=a,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>n||this.major<0)pulls the date into the patchSame as https://github.com/anthropics/claude-code/issues/16673
Check https://github.com/anthropics/claude-code/issues/16673#issuecomment-3720643589 solution worked for me
+1
seeing the same all of a sudden
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I deleted the date in ~/.claude/cache/changelog.md , made the file read only and claude did start
Installing via brew fixed it for me
brew install --cask claude-codeFirst time for me that a GitHub issue feels like a CNN news live feed...
I think they rolled it back. try running
claude updatenow.Wow, quick fix, thanks!
thanks @bcherny <3
Blazing fast ⚡️
Fix is in. Can folks confirm that fixed it?
fixed!
@bcherny ran npm update -g @anthropic-ai/claude-code but still getting same error, do I need to clear cache?
+1.
I get this on when starting up:
I used to have Node.js v22.18.0, but I tried several things to get claude working again... what I alread did:
Still stuck.
claude update
Current version: 2.0.76
Checking for updates...
Claude Code is up to date (2.0.76)
but when I run: claude I get this:
ERROR Invalid Version: 2.1.0 (2026-01-07)
LOL why close the other one....
Still an issue. Same, got this as of 5 min ago....solution is to add the environment variable CLAUDE_CODE_SKIP_UPDATE_CHECK=1 which bypasses the buggy version parsing
this issue was created after the other .....crazy drunk vibe coding
https://github.com/anthropics/claude-code/issues/16688
same issue
ERROR Invalid Version: 2.1.0 (2026-01-07)
file:///Users/suchat_s/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/claude-co
de/cli.js:239:6514
-aj (file:///Users/suchat_s/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/clau
de-code/cli.js:239:6514)
-Rj8 (file:///Users/suchat_s/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/cla
ude-code/cli.js:239:11642)
-Object.fj (file:///Users/suchat_s/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-
ai/claude-code/cli.js:239:12198)
-code/cli.js:2614:4237)
-rr2 (file:///Users/suchat_s/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/cla
ude-code/cli.js:2614:4221)
-qs2 (file:///Users/suchat_s/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/cla
ude-code/cli.js:2614:14824)
-h5 (file:///Users/suchat_s/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/clau
de-code/cli.js:252:20693)
-IY (file:///Users/suchat_s/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/clau
de-code/cli.js:252:39057)
-ss (file:///Users/suchat_s/.nvm/versions/node/v20.19.5/lib/node_modules/@anthropic-ai/clau
de-code/cli.js:252:49664)
Nope, doesn't solve it for me. Using the brew version, if that matters.
you need to delete the date from the changelog
and set permission on the file
I have the same issue. However, I uninstalled and downgraded to the older version. It's still happening
Almost like it was a bad idea to parse a markdown changelog file to work out the latest version...
<img width="1765" height="193" alt="Image" src="https://github.com/user-attachments/assets/059d1975-f8bc-4a16-8364-106fa14dff64" />
Go to the end and delete this date "(2026-01-07)" here
~/.claude.jsonascachedChangelogsed -i '' 's/## 2.1.0 (2026-01-07)/## 2.1.0/g' ~/.claude.jsonWhat works for me now that there's an official fix:
May I suggest Anthropic create "tests" and "incremental rollout" (0.1%, 5%, 100% of clients) and "don't push experimental updates that don't have broad testing". I need claude, I mean Gemini to debug this problem.
not anohter issue...cant anyone read?
Had to do
npm install -g @anthropic-ai/claude-code@2.0.75after uninstalling.same
Bug Report: Claude Code 2.1.0 crashes on startup - WSL2/Linux
Environment:
Platform: WSL2 (Ubuntu) on Windows
Terminal: bash
Version: 2.1.0
Installation: npm/pnpm global install
Error:
ERROR Invalid Version: 2.1.0 (2026-01-07)
file:///home/scs/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:869:8900
Workaround:
bashrm -rf ~/.claude/cache ~/.claude/statsig
Then downgrade to 2.0.76:
bashpnpm add -g @anthropic-ai/claude-code@2.0.76
Root Cause:
The version string 2.1.0 (2026-01-07) stored in the statsig cache is not valid semver format. The date suffix in parentheses breaks the semver parser.
Last Working Version: 2.0.76
Remove
~/.claude/cache/changelog.mdfirst line date format.https://github.com/anthropics/claude-code/pull/16683
This fixed it. But it stays on v2.0.76 when I try to update
Pushing a patch version now to fix forward, just in case
Same. @bcherny will the patch allow us to update to 2.1.0?
Thanks for the quick fix @bcherny!
awesome! @bcherny
Still same for me
Reinstalling with the native install method (on MacOS) fixed it for me, pointing to 2.0.76 now
plz make sure to add to your env on
.claude.settings.json.to disable the autoupdater to prevent this happens again 😠<img width="269" height="75" alt="Image" src="https://github.com/user-attachments/assets/f13788c7-a77c-4fae-b1ff-4bfd0f2d3be6" />
<img width="661" height="53" alt="Image" src="https://github.com/user-attachments/assets/7f8a8c4c-f31b-42e2-a6d5-db9cf43bb9de" />
If the changelog workaround still fails for you, check your .claude.json file (in my case the global one in your home directory), there is a cachedChangelog key with the "bad" changelog there. If you see the bad version as the first entry, change it by removing the date, save it and it should work.
Looks like:
"cachedChangelog": "# Changelog\n\n## 2.1.0\n\n- Added automatic skill hot-reload...Thanks! This worked for me: sed -i '' 's/## 2.1.0 (2026-01-07)/## 2.1.0/g' ~/.claude.json
This workaround fixed it!! thank you!
Just lost my entire config :( Did anyone else? (
~/.claude.jsonhas been reset)2.1.1should now the be latest version, which includes hardening for this case.This worked for me, ty
For anyone else still hitting this, run
claude updateSeriously guys?
this version also does not work under windows, whilst 2.0.0 is performing fine. https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.0/win32-x64/claude.exe does not even throw an error. It is just stopping without any errors after 5 seconds.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.