[BUG] npm install fails EBUSY on libvips-42.dll with running sessions — regression from v2.1.87 (Windows)
Summary
npm install -g @anthropic-ai/claude-code fails with EBUSY: resource busy or locked on libvips-42.dll when any Claude Code window is open. This is a regression — v2.1.87 and all prior versions installed successfully with other windows open. v2.1.89 (and the briefly-published then yanked v2.1.88) both fail.
Error
npm error code EBUSY
npm error syscall copyfile
npm error path C:\Users\...\node_modules\@anthropic-ai\claude-code\node_modules\@img\sharp-win32-x64\lib\libvips-42.dll
npm error dest C:\Users\...\node_modules\@anthropic-ai\.claude-code-uwlplaD8\node_modules\@img\sharp-win32-x64\lib\libvips-42.dll
npm error errno -4082
npm error EBUSY: resource busy or locked, copyfile '...libvips-42.dll' -> '...libvips-42.dll'
Reproduction
- Have one or more Claude Code windows open on Windows
- Run
npm install -g @anthropic-ai/claude-code(with auto-updates disabled) - Install fails with EBUSY on libvips-42.dll
Expected behavior
Install completes with other windows open, as it did on v2.1.87 and earlier. New windows opened after the install pick up the new version.
Actual behavior
EBUSY on libvips-42.dll. Install fails entirely. Version stays on v2.1.87.
Root cause (suspected)
A dependency change in v2.1.88/v2.1.89 changed how @img/sharp-win32-x64 loads libvips-42.dll. It now appears to be held open for the entire process lifetime rather than loaded transiently, preventing npm from copying the file during an upgrade.
Impact
Users with auto-updates disabled (required on Windows due to historical Bun-related crash issues) must close ALL Claude Code windows to upgrade — interrupting active agent sessions, overnight pipelines, and any long-running work.
Environment
- OS: Windows
- Claude Code: v2.1.87 (installed) → v2.1.89 (target)
- Install method:
npm install -g @anthropic-ai/claude-code(auto-updates disabled) - Node processes at time of install: 13 running node.exe instances (Claude Code windows)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗