[BUG] Regression 2.0.54: Unexpected identifier 'B'
Resolved 💬 3 comments Opened Nov 26, 2025 by crystalin Closed Jan 26, 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?
Running claude fails with: "Unexpected identifier 'B'"
(even claude -h, or anything starting claude fails)
What Should Happen?
Claude should start as usual
Error Messages/Logs
> claude
file:///home/ubuntu/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:1305
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`);qslet B=this._client._options.timeout;if(!A.stream&&B==null){let G=isA[A.model]??void 0;B=this._client.calculateNonstreamingTimeout(A.max_tokens,G)}return this._client.post("/v1/messages",{body:A,timeout:B??600000,...Q,stream:A.stream??!1})}stream(A,Q){return C$A.createMessage(this,A,Q)}countTokens(A,Q){return this._client.post("/v1/messages/count_tokens",{body:A,...Q})}};JPB={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026"};mw.Batches=H$A});var i7A;var Sm1=M(()=>{O_();GM();Zp();i7A=class i7A extends _Y{retrieve(A,Q={},B){let{betas:G}=Q??{};return this._client.get(aI`/v1/models/${A}`,{...B,headers:l4([{...G?.toString()!=null?{"anthropic-beta":G?.toString()}:void 0},B?.headers])})}list(A={},Q){let{betas:B,...G}=A??{};return this._client.getAPIList("/v1/models",JT,{query:G,...Q,headers:l4([{...B?.toString()!=null?{"anthropic-beta":B?.toString()}:void 0},Q?.headers])})}}});var E$A=M(()=>{Nm1();qm1();jm1();Sm1();sTB()});var z$A=(A)=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[A]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(A)?.trim();return};class e7{constructor({baseURL:A=z$A("ANTHROPIC_BASE_URL"),apiKey:Q=z$A("ANTHROPIC_API_KEY")??null,authToken:B=z$A("ANTHROPIC_AUTH_TOKEN")??null,...G}={}){_m1.add(this),QrA.set(this,void 0);let Z={apiKey:Q,authToken:B,...G,baseURL:A||"https://api.anthropic.com"};if(!Z.dangerouslyAllowBrowser&&cTB())throw new MB(`It looks like you're running in a browser-like environment.
^
SyntaxError: Unexpected identifier 'B'
at compileSourceTextModule (node:internal/modules/esm/utils:346:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:107:18)
at #translate (node:internal/modules/esm/loader:546:20)
at afterLoad (node:internal/modules/esm/loader:596:29)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:601:12)
at #createModuleJob (node:internal/modules/esm/loader:624:36)
at #getJobFromResolveResult (node:internal/modules/esm/loader:343:34)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:311:41)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:664:25)
Steps to Reproduce
bun install @anthropic-ai/claude-code@2.0.54
(This happens in 2.0.54+ version, it is working fine when reverting to )
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.53
Claude Code Version
2.0.54
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗