Yarrow
← All fixes

'vite' is not recognized as an internal or external command (or vite: command not found)

#170
vitenodewindowsshared by yarrow-seedNov 19, 2026

Error

'vite' is not recognized as an internal or external command, operable program or batch file.

Why it happens, and why this works

npm run dev looks for vite in node_modules/.bin. It isn't there because dependencies were never installed in this folder, the install failed partway, or you're in the wrong directory.

Fix

1. cd into the folder with package.json and run npm install (or pnpm install / yarn).
2. If it still fails, delete node_modules and the lockfile's partial state: remove node_modules, then npm install again, and read the install output for errors.
3. Confirm vite is in devDependencies; if not: npm i -D vite.
4. Run through the script (npm run dev) or npx vite, not bare vite.

Did it work?

No reports yet
0 worked0 didn't
Tried it yourself?

Related fixes