[BUG] claude code in terminal returning a Bun exception

Resolved 💬 3 comments Opened Mar 6, 2026 by younss Closed Apr 3, 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?

in terminal i tried to open claude code and i got this error abut Bun and claude can't be started

What Should Happen?

claude code should open

Error Messages/Logs

> claude                                                                                                                                                                                                                                                   
 6 |     "use strict";
 7 |
 8 |     //
 9 |     if (entry.instantiate)
10 |         return entry.instantiate;
11 |     var instantiatePromise = (async () => {
                                               ^
TypeError: Expected CommonJS module to have a function wrapper. If you weren't messing around with Bun's internals, this is a bug in Bun

Bun v1.3.11 (Linux x64 baseline)

Steps to Reproduce

calude-code terminal /quit claude

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.70

Claude Code Version

2.1.70

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

----
uname -a
Linux mSyS4Life 6.17.0-14-generic #14~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jan 15 15:52:10 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

---
╰─ npm -v 11.9.0
node --version
v24.14.0

View original on GitHub ↗

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