Windows path bug: missing backslash in marketplace plugin path
Bug Report: Windows Path Construction Bug in Marketplace Plugin Installation
Summary
When running /plugin marketplace add thedotmack/claude-mem on Windows, a permission error occurs that reveals a path construction bug. The error message shows the path is incorrectly formed with a missing backslash separator.
Environment
- OS: Windows (MSYS_NT-10.0-26200)
- Claude Code Version:
@anthropic-ai/claude-code@2.1.41 - Installation Method: npm (
npm install -g @anthropic-ai/claude-code)
Reproduction Steps
- Run the command:
/plugin marketplace add thedotmack/claude-mem
Actual Error
Error: EPERM, Permission denied: \?\C:\Users\keyea\.claude\plugins\marketplaces\thedotmack-claude-mem '\?\C:\Users\keyea\.claude\plugins\marketplaces\thedotmack-claude-mem'
Error: EPERM, Permission denied: \?\C:\Users\keyea.claude\plugins\marketplaces\thedotmack-claude-mem '\?\C:\Users\keyea.claude\plugins\marketplaces\thedotmack-claude-mem'
Expected Behavior
The marketplace directory should be created at:
C:\Users\keyea\.claude\plugins\marketplaces\
Actual Behavior
The path is incorrectly constructed as:
C:\Users\keyea.claude\plugins\marketplaces\
Notice: keyea.claude instead of keyea\.claude - the backslash separator is missing.
Root Cause Analysis
Based on code exploration of the minified CLI bundle (cli.js), the bug appears to be in the path construction logic for Windows:
Affected file: C:\Users\keyea\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\cli.js
Functions involved:
Uv()- Returns the base Claude directory pathbd7()- ReturnsmZ(Uv(), "marketplaces")wheremZispath.joinvM8()- Downloads and validates marketplaces
The most likely cause is string concatenation being used instead of path.join() somewhere in the path construction chain, or the base path being returned without proper normalization.
Temporary Workaround
The directory can be manually created at the correct path:
mkdir -p "C:\Users\keyea\.claude\plugins\marketplaces\"
Impact
This bug prevents Windows users from installing marketplace plugins via the /plugin marketplace add command.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗