Skip to content
All findings

Vite 8.0.16+ dev server 403s any path containing ':' on macOS/Linux; server.fs.allow can't fix it, only fs.strict:false or renaming

Published 30 Nov 2026

Since the June 2026 Windows alternate-data-stream fix (8.0.16, backported to 7.3.x and 6.4.x), Vite rejects every dev-server path with ':' even on macOS/Linux. Dynamic imports like import('./routes/user:avatar/index.js') fail in the browser, and a project folder with ':' 403s even index.html. Adding the folder to server.fs.allow (what the error message suggests) still returns 403.

What happened

Some code generators name folders after route names, e.g. Laravel Wayfinder writes routes/company:logo/index.ts. : is a legal filename character on macOS and Linux. On Vite 8.4.0:

log
[default (fs.strict=true)] GET /src/routes/company:logo/index.js -> 403[fs.strict=false]          GET /src/routes/company:logo/index.js -> 200

The server logs this misleading message:

log
The request id ".../src/routes/company:logo/index.js" is outside of Vite serving allow list.- <project root>Refer to docs https://vite.dev/config/server-options.html#server-fs-allow

…even though the file is inside the root. Doing what the message says doesn't help:

log
fs.allow: [root]                           GET /src/routes/user:avatar/index.js -> 403fs.allow: [root, src/routes/user:avatar]   GET /src/routes/user:avatar/index.js -> 403fs.strict: false                           GET /src/routes/user:avatar/index.js -> 200

In headless Chrome against the dev server, static imports work because Vite pre-transforms them, but a dynamic import fails:

log
static import ./routes/company:logo: company:logodynamic import ./routes/user:avatar FAILED: Failed to fetch dynamically imported module: http://localhost:5199/src/routes/user:avatar/index.js

If the project folder itself contains : (e.g. /tmp/my:app), every request 403s, including / and /index.html.

Don't be fooled by %3A: GET /src/routes/company%3Alogo/index.js returns 200, but the body is the SPA-fallback index.html, not the module.

Which versions

Tested with the same script on each version (output-version-matrix.txt):

| vite | GET /src/routes/company:logo/index.js | |---|---| | 8.0.15 | 200 | | 8.0.16 (2026-06-01, "reject windows alternate paths" #22572) | 403 | | 8.2.6, 8.3.0, 8.3.8, 8.4.0 (2026-11-26) | 403 | | 7.3.8, 6.4.6 (backports) | 403 |

Repro

bash
cd project && sh setup.sh && npm i   # setup.sh recreates the ':' folders and index.htmlnode colon-403.mjs       # raw fetches, strict vs non-strictnode colon-allow.mjs     # server.fs.allow does not helpnode colon-browser.mjs   # headless Chrome (uses /Applications/Google Chrome.app), static vs dynamic import# project root containing ':'  -> copy project/ to "/tmp/my:app" and run colon-root.mjs there

Raw output: output.txt, output-version-matrix.txt. Node 26.11.1, macOS (darwin).

Fix / workaround

  • Best: keep : out of file and folder names (configure or post-process the generator), and keep the project out of folders whose names contain :.
  • Dev-only escape hatch: server: { fs: { strict: false } }. This turns off the whole serving allow-list, so use it only when the dev server isn't exposed to the network.
  • server.fs.allow does not help. Don't pin 8.0.15 either: 8.0.16 is a security fix (GHSA-fx2h-pf6j-xcff, server.fs.deny bypass on Windows).
  • Vitest's jsdom and happy-dom environments hit the same check (vitest-dev/vitest#11413, closed with "fix belongs in Vite").

Docs status

The server.fs.strict / server.fs.allow docs at vite.dev/config/server-options don't mention : or alternate paths. The 8.0.16 changelog line says only "reject windows alternate paths", but the check also runs on macOS and Linux.

Who's hitting it

  • https://github.com/vitejs/vite/issues/23620 (open, "pending triage"; the reporter maintains a local patch)
  • https://github.com/vitest-dev/vitest/issues/11413 (closed, redirected to Vite)