Vite documented errors
Browse documented Vite errors with exact messages, troubleshooting context, and practical remediation steps.
Build Errors
Build Errors errors
Module "fs" has been externalized for browser compatibility.Vite externalized a Node.js module for browser compatibilityVite detected Node.js-only module usage in browser code and externalized it instead of bundling it into the client build.
With statements cannot be used with the "esm" output format due to strict modeVite failed because code requires non-strict modeVite encountered code that only works in sloppy mode, but Vite uses ESM and strict mode, so the code cannot be transformed safely.
Configuration
Configuration errors
Development Servers
Development Servers errors
Error: Cannot find module 'C:\foo\bar&baz\vite\bin\vite.js'Vite cannot start because the project path contains an ampersand on WindowsVite fails to start on Windows when the project path contains an ampersand, because npm path handling can break the CLI launch.
Cross drive links on WindowsVite cross-drive links do not work on WindowsVite development setups can break on Windows when linked dependencies span different drives, because path resolution and watcher behavior become inconsistent.
Port 5173 is already in useVite dev server port already in useVite cannot start its dev server because another process is already bound to the requested port.
Requests are stalled foreverVite dev server requests are stalled foreverThe Vite dev server can appear to hang when the host environment hits file-descriptor or inotify limits under heavy request volume.
431 Request Header Fields Too LargeVite dev server returns 431 Request Header Fields Too LargeThe Vite dev server can return 431 errors when request headers become too large, often because of oversized cookies or local browser state.
Vite does not detect a file changeVite does not detect file changes under WSL2Vite file watching can fail under WSL2 in certain filesystem conditions, preventing the dev server from noticing edits.
Vite detects a file change but the HMR is not workingVite HMR is not working because a file is imported with the wrong caseVite sees the changed file, but Hot Module Replacement fails because the import path casing does not exactly match the real file path.
A full reload happens instead of HMRVite performs a full reload instead of Hot Module ReplacementVite fell back to a full page reload because the changed module is not handled safely by HMR or there is a dependency loop preventing a targeted update.
Runtime
Runtime errors
TypeError: Failed to fetch dynamically imported moduleVite app failed to fetch a dynamically imported moduleA Vite-built app tried to load a dynamic import chunk that was unavailable, blocked, or mismatched with the currently cached HTML.
White screen without logged errorsVite app shows a white screen because browser extensions are blocking requestsA browser extension such as an ad blocker can prevent the Vite client from sending or receiving requests, leaving the page blank without obvious application errors.
Access to script at 'file:///...' from origin 'null' has been blocked by CORS policyVite built file failed because it was opened over the file protocolA built Vite app was opened directly from the filesystem, but browser security blocks module and asset loading over the `file://` protocol.
TypeError: Cannot create property 'foo' on boolean 'false'Vite surfaced a strict-mode type error from incompatible codeVite surfaced runtime code that depends on non-strict JavaScript semantics, which fail under ESM strict mode.