背景

由于公司windows电脑使用的云桌面,其提供的CPU不支持 AVX 指令集,而Claude Code最新稳定版 2.1.117不兼容,启动Claude Code会报错

============================================================
Bun v1.3.13 (6db6c97b) Windows x64 (baseline)
Windows v.win10_ni
Args:
Features: no_avx2 no_avx
Elapsed: 3ms | User: 0ms | Sys: 15ms
RSS: 16.57MB | Peak: 16.58MB | Commit: 25.27MB | Faults: 4618
CPU lacks AVX support. Please consider upgrading to a newer CPU.
panic(thread 23132): attempt to use null value
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:

 https://bun.report/1.3.13/e_16db6c97AggggggDmps5Go/p97DCAoh7FCAivzUA0

解决方法:

根据 GitHub issue,版本 2.1.0 可以在不支持 AVX 的 CPU 上正常运行。

于是先卸载最新版本的claude code:

npm uninstall -g @anthropic-ai/claude-code

然后安装2.1.0版本:

npm install -g @anthropic-ai/claude-code@2.1.0

然后还没完,因为claude code启动会自动更新到最新版本,因此需要关闭自动更新,配置环境变量,运行命令:

setx DISABLE_AUTOUPDATER 1

然后就可以正常使用了

Logo

欢迎加入DeepSeek 技术社区。在这里,你可以找到志同道合的朋友,共同探索AI技术的奥秘。

更多推荐