VScode的claude code插件报错command ‘claude-vscode.editor.openLast‘ not found

报错信息

复制代码
command 'claude-vscode.editor.openLast' not found

解决方案

1.简单版-回退版本

在VS code左侧的拓展栏,搜索claude,在【卸载】下面安装特定版本,选择2.1.51之前的版本安装,取消勾选自动更新,然后重启拓展就好了

2.详细版-修补Linux配置项路径

修补3条硬编码的Linux配置项路径或采用脚本解决,可参考github

http://BUG TypeError: createRequire fails with hardcoded Linux path on Windows --- extension fails to activate (v2.1.51) · Issue #28054 · anthropics/claude-code

BUG VS code latest extension bug · Issue #28097 · anthropics/claude-code

原因分析

2026.2.24更新的Claude Code VS Code 扩展 v2.1.51(win32-x64)在 Windows 上无法激活,且与 createRequire 相关的 TypeError。该错误引用了一个Linux构建服务器路径(/home/runner/work/claude-cli-internal/...),但在Windows上是无效的。

回退历史版本后无报错,使用正常,其他情况导致的问题可尝试其他方案解决。

相关推荐
kyriewen8 小时前
Anthropic 估值逼近万亿美元,Claude Sonnet 5 + Claude Science 一天两连发
前端·ai编程·claude
ServBay12 小时前
7 个AI开发中真正用得上的 MCP Server,配合Claude Code食用效果更佳
后端·claude·mcp
小七-七牛开发者15 小时前
Coding Agent 规则管理:CLAUDE.md、Skills、Hooks、Subagents 到底怎么选?
ai·大模型·agent·claude·token·loop·mcp·claudecode·ai coding
码哥字节18 小时前
213000星的Superpowers,90%的人只用了它10%的功能
claude code·ai编程工具·claude code技巧
Flynt19 小时前
配置Chrome DevTools MCP,我在Windows上折腾了两个晚上
ai编程·claude·mcp
想要成为糕糕手19 小时前
Harness Engineering:大模型时代的“马鞍”——从记忆层开始,让AI真正为你所用
面试·ai编程·claude
lincats1 天前
Claude Code项目越写越乱?这套清理流程能救你
ai·ai agent·claude code
Lsx_2 天前
不只是 Prompt:用 Superpowers Skill 给 AI 编程装上工程化工作流
前端·ai编程·claude