×
注意!页面内容来自https://claude.ai/public/artifacts/3f9b7523-e7a0-463c-a1fa-f027a81460a3,本站不储存任何内容,为了更好的阅读体验进行在线解析,若有广告出现,请及时反馈。若您觉得侵犯了您的利益,请通知我们进行删除,然后访问 原网页
When running Claude Code CLIyou may encounter this error:
⚠ Error installing VS Code extension: 1: 1 Error: End of central directory record signature not found. Either not a zip fileor file is truncated.
Failed Installing Extensions: file://[path]/claude-code.vsix
Please restart your IDE and try again.The Claude Code CLI package includes a bundled VS Code extension file (.vsix) that it tries to automatically install. This bundled file can become corrupted (0 bytes)causing the error above.
These are two separate components. The CLI works fine without the extensionbut you won't have IDE integration features.
Benefits:
If you need to check if the VSIX file is corrupted:
# Check the file size (macOS/Linux)
ls -la ~/.claude/local/node_modules/@anthropic-ai/claude-code/vendor/claude-code.vsix
# Check the file size (Windows)
dir %USERPROFILE%\\.claude\\local\\node_modules\\@anthropic-ai\\claude-code\\vendor\\claude-code.vsixIf the file size is 0 bytesit's corrupted.
If you see "Multiple installations detected"you likely have Claude Code installed both globally and locally:
# Check global installation
npm list -g @anthropic-ai/claude-code
# Check local installation
cd ~/.claude/local && npm list @anthropic-ai/claude-codeThis warning is harmless. To remove ituninstall the version you're not using:
# If using local versionremove global:
npm uninstall -g @anthropic-ai/claude-code
# If using global versionremove local:
rm -rf ~/.claude/local/node_modules/@anthropic-ai/claude-code # macOS
/Applications/Visual\\ Studio\\ Code.app/Contents/Resources/app/bin/code --list-extensions | grep claude
# Windows
code --list-extensions | findstr claude
# Linux
code --list-extensions | grep claude claude --version~/.claude/ and won't be affected by reinstallingnpm cache clean --force.claude directoryAlways install the VS Code extension from the marketplace rather than relying on the bundled VSIX file from the CLI package.