You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76 #64322
Node.js process crash on build exit: Assertion failed: !(handle->flags & UV_HANDLE_CLOSING) on Windows
Environment Info
OS: Windows 11 (build local time check: 2026-07-06)
Node.js Version: v24.13.0
npm Version: 11.x (or matching Node v24 default)
Framework/Tooling: Astro ^7.0.6 with Svelte ^5.56.4 integration
Libraries in play: curtainsjs ^8.1.6, gsap ^3.15.0, lenis ^1.3.25
Description
When running npm run build (which runs astro check && astro build), the static assets compile successfully with 0 errors and 0 warnings. However, immediately after the compilation output shows [build] Complete!, the process crashes during termination with a low-level libuv assertion error.
Error Console Output
generating static routes
14:11:19 ├─ /index.html (+38ms)
14:11:19 ✓ Completed in 131ms.
14:11:19 [build] ✓ Completed in 452ms.
14:11:19 [build] 1 page(s) built in 531ms
14:11:19 [build] Complete!
Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76
How to Recreate This Issue
This issue can be reproduced on any Windows system with Node.js v24.x using a fresh Astro template:
Verify the crash:
Once the build completes and attempts to exit the process, the console will print: Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76 and exit with code 1.
Additional Context
The issue appears to be a use-after-close race condition when Node.js tear-down steps close file-watchers or active handles created by Vite/Astro.
Since the build completes successfully, all output artifacts are generated correctly. The crash only occurs on process exit.
This is a known OS-specific issue for Windows runtimes inside libuv.
How often does it reproduce? Is there a required condition?
Every build
What is the expected behavior? Why is that the expected behavior?
No errors.
What do you see instead?
Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76 and exit with code 1.
Additional information
What steps will reproduce the bug? section include the output of an agent, every reference/explanation is there.
Activity
terranw-ka commentedon Jul 9, 2026
Same error when using
@redocly/cli, both2:37.0and2:38.0.Environment
v24.11.011.6.111.6.1Log
Archkon commentedon Jul 13, 2026
src: avoid use-after-close of delayed task scheduler async handle
StefanStojanovic commentedon Jul 24, 2026
Closing this since the connected PR landed and its issue got closed.
fix: make fetch timeout explicitly cancellable in fetchPosts
fix: make fetch timeout explicitly cancellable in fetchPosts
fix: make fetch timeout explicitly cancellable in fetchPosts
Rebuild kazuhito.dev as a static Astro site (#11)