Plugin Load Failure Error — Fix (2026)
The Error
Error: Failed to load plugin '@claude/plugin-git-hooks' from /Users/you/.claude/plugins/git-hooks
Reason: Cannot find module 'node:test' (Node 16 detected, requires Node 18+)
This error occurs when a Claude Code plugin cannot be loaded due to missing dependencies, incompatible Node version, or a corrupted plugin installation.
The Fix
- Check which plugins are installed:
ls -la ~/.claude/plugins/ 2>/dev/null
- Reinstall the failing plugin:
rm -rf ~/.claude/plugins/git-hooks
claude plugins install @claude/plugin-git-hooks
- Ensure your Node version meets the plugin’s requirements:
node --version
# Must be 18+ for most Claude Code plugins
nvm use 22
- Verify all plugins load correctly:
claude --version
Why This Happens
Claude Code plugins are Node.js modules loaded at startup. They fail when: the plugin’s dependencies are missing (deleted node_modules), the plugin requires a newer Node version than what is running, the plugin’s entry point file has been deleted or moved, or the plugin is incompatible with the current Claude Code version.
If That Doesn’t Work
- Disable the failing plugin temporarily:
claude config set disabledPlugins '["@claude/plugin-git-hooks"]'
- Clear all plugins and reinstall:
rm -rf ~/.claude/plugins
claude plugins install @claude/plugin-git-hooks
- Check for plugin version mismatch:
cat ~/.claude/plugins/git-hooks/package.json | python3 -c "import sys,json; print(json.load(sys.stdin).get('engines',{}))"
Prevention
Add this to your CLAUDE.md:
# Plugins
- Pin plugin versions in your project config.
- Test plugins after every Node.js version upgrade.
- Keep plugins list minimal — each plugin adds startup time and failure risk.
See Also
- Claude Code ESLint Plugin Crashes on Custom Rule — Fix (2026)
- IPv6 Fallback Failure Error — Fix (2026)
- Neovim Plugin Socket Error Fix
- TLS Version Negotiation Failure — Fix (2026)
- Pre-Commit Hook Failure on Claude Changes Fix
Related Error Messages
This fix also applies if you see variations of this error:
- Connection or process errors with similar root causes in the same subsystem
- Timeout variants where the operation starts but does not complete
- Permission variants where access is denied to the same resource
- Configuration variants where the same setting is missing or malformed
If your specific error message differs slightly from the one shown above, the fix is likely the same. The key indicator is the operation that failed (shown in the stack trace) rather than the exact wording of the message.
Frequently Asked Questions
Does this error affect all operating systems?
This error can occur on macOS, Linux, and Windows (WSL). The exact error message may differ slightly between platforms, but the root cause and fix are the same. macOS users may see additional Gatekeeper or notarization prompts. Linux users should check that the relevant system packages are installed. Windows users should ensure they are running inside WSL2, not native Windows.
Will this error come back after updating Claude Code?
Updates can occasionally reintroduce this error if the update changes default configurations or dependency requirements. After updating Claude Code, verify your project still builds and runs correctly. If the error returns, reapply the fix and check the changelog for breaking changes.
Can this error cause data loss?
No, this error occurs before or during an operation and does not corrupt existing files. Claude Code’s edit operations are atomic — they either complete fully or not at all. However, if the error occurs during a multi-step operation, you may have partial changes that need to be reviewed with git diff before continuing.
How do I report this error to Anthropic if the fix does not work?
Open an issue at github.com/anthropics/claude-code with: (1) the full error message including stack trace, (2) your Node.js version (node --version), (3) your Claude Code version (claude --version), (4) your operating system and version, and (5) the command or operation that triggered the error.
Related Guides
Try it: Paste your error into our Error Diagnostic for an instant fix.