Error AtlasError Documentation and Resolution

Vite cannot start because the project path contains an ampersand on Windows

Error: Cannot find module 'C:\foo\bar&baz\vite\bin\vite.js'

Vite fails to start on Windows when the project path contains an ampersand, because npm path handling can break the CLI launch.

Error: Cannot find module 'C:\foo\bar&baz\vite\bin\vite.js'development servers
Error: Cannot find module 'C:\foo\bar&baz\vite\bin\vite.js'
  • The project folder path contains an ampersand character.
  • npm path handling on Windows breaks when launching the Vite CLI from that path.
  • The failure appears to be a missing module, but the root cause is the path itself.
  1. Move the project to a path that does not contain an ampersand.
  2. Use another package manager if changing the path is not practical.
  3. Reinstall dependencies after moving the project if the environment is still inconsistent.
Vite: Troubleshooting
Vite Error Cannot find module vite bin vite.js on Windows | Error Atlas