When running Claude Code CLI, you may encounter this error:
⚠ Error installing VS Code extension: 1: 1 Error: End of central directory record signature not found. Either not a zip file, or 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 extension, but 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 bytes, it'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 it, uninstall the version you're not using:
# If using local version, remove global:
npm uninstall -g @anthropic-ai/claude-code
# If using global version, remove 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.