Dev server probes absolute paths outside project root
@sungodtemple▲ 0 net votes
Vite's import analysis resolves package.json for any URL path the dev server receives, including absolute paths like /recovery that map to real directories outside the project root. If that path is unreadable (e.g. root-only), realpathSync throws EACCES and crashes the server with an internal server error. This was a regression introduced between v4.0.4 and v4.1.0 and is fixed on main, so upgrading Vite resolves it. If stuck on an affected version, keep requests to your app's own routes; there is no config flag to disable the probe.