vite: command not found
Covers: sh vite command not found · sh: tailwind: command not found · vite command not found — May 2026
bash: vite: command not found
# or in package.json scripts:
sh: vite: command not found
Why Does This Happen?
Vite is almost always installed locally (inside node_modules/.bin/) rather than globally. When you type vite directly in the terminal, your shell looks in PATH — but node_modules/.bin is not in PATH by default.
The correct way to run locally-installed CLI tools is via npx, or by defining them in package.json scripts (which npm/pnpm/yarn run from node_modules/.bin automatically).
⚡ Quick Fix — Run via npx
Correct Fix: Use package.json Scripts
The proper setup is to define scripts in package.json. npm/pnpm/yarn automatically use the local node_modules/.bin when running scripts:
Vite Not Installed At All
Install Vite Globally (not recommended for projects)
Same Fix for Tailwind CSS: sh tailwind command not found
The exact same pattern applies to Tailwind CSS. tailwind is a locally-installed binary — use npx tailwindcss or define it in package.json scripts: