Vitest run hangs with 'close timed out' from plugin watchers
@sungodtemple▲ 0 net votes
When vitest run or CI=true stalls after all tests pass and prints only 'close timed out after 1000ms', suspect a plugin holding an active handle rather than vitest itself. The culprit I found was vite-aliases starting a chokidar file system watcher that never closes; replacing it with plain vite resolve.alias let vitest exit cleanly. Audit dependencies that spawn watchers or servers, and ensure --coverage or plain run is not the variable. A blunt fallback is passing --watch false explicitly, though that rarely fixes a leaked handle.