gemini-cli - 💡(How to fix) Fix Windows upgrade failure: npm -g install @google/gemini-cli@latest returns EBUSY on locked conpty.node [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25467Fetched 2026-04-16 07:06:04
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Error Message

Updating Gemini CLI from 0.37.0 to latest on Windows failed with npm error EBUSY during file copy/rename. Error excerpt:

Fix Action

Fix / Workaround

  • Workaround used:
    • Kill node/gemini processes
    • Remove old Gemini files under C:\Users\ali.jamal\AppData\Local\nvm\v24.14.0...
    • Re-run install (then upgrade succeeded to 0.38.0)
RAW_BUFFERClick to expand / collapse

What happened?

Updating Gemini CLI from 0.37.0 to latest on Windows failed with npm error EBUSY during file copy/rename. The failing file was:

C:\Users\ali.jamal\AppData\Local\nvm\v24.14.0\node_modules\@google\gemini-cli\node_modules\@lydell\node-pty-win32-x64\conpty.node

Error excerpt:

  • npm ERR! code EBUSY
  • npm ERR! syscall copyfile
  • npm ERR! errno -4082
  • npm ERR! EBUSY: resource busy or locked, copyfile ... conpty.node

The install only succeeded after stopping node/gemini processes and removing old files first.

What did you expect to happen?

npm -g install @google/gemini-cli@latest should upgrade successfully without manual cleanup, or at least fail with a clearer actionable message and safe recovery steps.

Client information

  • OS: Windows 10 (10.0.19045)
  • Shell: PowerShell 7.6.0
  • Node: v24.14.0
  • npm: 11.9.0
  • Install style: nvm4w global install
  • From version: @google/gemini-cli 0.37.0
  • Target/latest seen: 0.38.0

Client information

OS: Windows 10 (10.0.19045) Shell: PowerShell 7.6.0 Node: v24.14.0 npm: 11.9.0 Install style: nvm4w global install From version: @google/gemini-cli 0.37.0 Target/latest seen: 0.38.0

Login information

  • Auth method: Personal Google account via OAuth (oauth-personal)

  • Anything else we need to know?

  • Repro path:

    1. & "C:\nvm4w\nodejs\gemini.cmd" --version (shows 0.37.0)
    2. & "C:\nvm4w\nodejs\npm.cmd" -g install @google/gemini-cli@latest
    3. Fails with EBUSY on conpty.node
  • npm debug log: C:\Users\ali.jamal\AppData\Local\npm-cache_logs\2026-04-15T16_03_18_260Z-debug-0.log

  • Workaround used:

    • Kill node/gemini processes
    • Remove old Gemini files under C:\Users\ali.jamal\AppData\Local\nvm\v24.14.0...
    • Re-run install (then upgrade succeeded to 0.38.0)

Anything else we need to know?

No response

extent analysis

TL;DR

Stop any running node or Gemini processes and remove old files before attempting to upgrade the Gemini CLI using npm.

Guidance

  • Verify that no node or Gemini processes are running in the background before attempting the upgrade.
  • Remove any old Gemini files under the C:\Users\ali.jamal\AppData\Local\nvm\v24.14.0\node_modules directory to prevent file locking issues.
  • Use the taskkill command in PowerShell to force-kill any remaining processes if necessary.
  • Re-run the npm -g install @google/gemini-cli@latest command after cleanup to attempt the upgrade again.

Example

No code snippet is necessary for this issue, as it involves manual process management and file removal.

Notes

This workaround may not be necessary in future versions of the Gemini CLI or npm, as it may be addressed as a bug fix. Additionally, this issue appears to be specific to Windows and the nvm4w global install style.

Recommendation

Apply the workaround by stopping node/Gemini processes and removing old files before upgrading, as this has been proven to resolve the issue in the reported case.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING