[BUG] PowerShell installer crashes with Bun ENOTCONN error on Windows 11
Status Fixed / completed
Maintainer reply ✓ Yes — ant-kurt
Activity 6 comments · opened Oct 7, 2025 · closed Oct 30, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator)
responded on this thread — see the highlighted reply below.
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Environment:
- OS: Windows 11
- Terminal: PowerShell
- Command used: & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) latest
Error:
panic(main thread): Unexpected error
ENOTCONN: Transport endpoint is not connected (open())
Bun v1.2.23 crashes during installation
Expected behavior:
Installation should complete successfully as documented
Actual behavior:
Bun crashes with ENOTCONN error
What Should Happen?
The installation should complete successfully and Claude Code should be installed without any Bun crashes or ENOTCONN errors.
Error Messages/Logs
Setting up Claude Code...
============================================================
Bun v1.2.23 (cf136713) Windows x64 (baseline)
Windows v.win11_dt
CPU: sse42 avx avx2
Args: "C:\Users\username\.claude\downloads\claude-2.0.9-win32-x64.exe" "install" "stable"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) jsc spawn standalone_executable
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:domain" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:path/win32" "node:perf_hooks" "node:process" "node:querystring" "node:stream" "node:string_decoder" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:zlib" "undici" "ws" "node-fetch" "node:inspector" "node:http2"
Elapsed: 520ms | User: 531ms | Sys: 78ms
RSS: 0.34GB | Peak: 0.34GB | Commit: 0.43GB | Faults: 83252 | Machine: 16.52GB
panic(main thread): Unexpected error
ENOTCONN: Transport endpoint is not connected (open())
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:
https://bun.report/1.2.23/e_1cf13671Az//v//B+kjgXisjljB2wm7iB__0jg40CA0eNoLzUutKEhNLklNUUgtKsov4pKONsiVjjY2zHX18w9x9vfzgwgY5VqBGAohRYl5xQX5RSUKqXkpBfmZeSUKmcUKefklCsn5eXkQg0CqNfILUvM0NDVBmgCMOyDn
✅ Installation complete!
Steps to Reproduce
- Open PowerShell on Windows 11
- Run the installation command:
& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) latest
- Bun starts installing but crashes immediately with ENOTCONN error
- Installation fails
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.8
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Windows Terminal
Additional Information
_No response_
6 Comments
It seems that the root cause has been resolved on the Bun side. https://github.com/oven-sh/bun/pull/23344
I hope it will be incorporated into Claude Code as soon as possible.
I encountered the same issue
Bun v1.2.23 (cf136713) Windows x64 (baseline)
Windows v.win10_cu
CPU: sse42 avx avx2 avx512
Args: "C:\Users\[USERNAME]\.local\bin\claude.exe"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) jsc spawn standalone_executable tsconfig
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:domain" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:path/win32" "node:perf_hooks" "node:process" "node:querystring" "node:stream" "node:string_decoder" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:zlib" "undici" "ws" "node-fetch" "node:inspector" "node:http2"
Elapsed: 2791ms | User: 1312ms | Sys: 140ms
RSS: 0.26GB | Peak: 0.26GB | Commit: 0.32GB | Faults: 67145 | Machine: 21.47GB
panic(main thread): Unexpected error
ENOTCONN: Transport endpoint is not connected (open())
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:
https://bun.report/1.2.23/e_1cf13671Qz//v//B+kjgXisjljB2wm7iB__0jg40CA0eNoLzUutKEhNLklNUUgtKsov4pKONsiVjjY2zHX18w9x9vfzgwgY5VqBGAohRYl5xQX5RSUKqXkpBfmZeSUKmcUKefklCsn5eXkQg0CqNfILUvM0NDVBmgCMOyDn
update and temporary mitigation shared in https://github.com/oven-sh/bun/issues/23315
I use 1.30
bun installVitepress.Windows11 Wezterm
bun install v1.3.0 (b0a6feca)
📦 Installing [128/127] error: Failed to run script postinstall due to error ENOTCONN
This should be resolved as of v2.0.25
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.