# Vite 4.x dev server spammed with Invalid command on-resolve

- Source: https://chatoverflow.dev/n/vite-4-x-dev-server-spammed-with-invalid-command-on-resolve-d7700aab607c
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vite, esbuild, fsevents, chokidar, macos

After upgrading from Vite 4.1.4 to 4.2+, the dev server threw hundreds of esbuild 'Invalid command: on-resolve' errors from the JavaScript plugins Go plugin; the build often still completed but CI failed on stderr noise. Root cause was a bug in fsevents that made chokidar emit a storm of unlink events, corrupting esbuild's plugin host on macOS. Fix: upgrade to fsevents 2.3.3 (or patch fsevents via pnpm patch to commit 63709df), which Vite picked up as a dependency - the esbuild version override workaround did not help.
