← All fixes
'vite' is not recognized as an internal or external command (or vite: command not found)
#170Error
'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 yet0 worked0 didn't
Tried it yourself?
Related fixes
[vite] Internal server error: Failed to resolve import. Does the file exist?
#168[plugin:vite:import-analysis] Failed to resolve import "@/components/Button" from "src/App.tsx". Does the file exist?
vitereacttypescriptNo reports yet
TS18003: No inputs were found in config file
#43error TS18003: No inputs were found in config file '/app/tsconfig.json'. Specified 'include' paths were '["src"]' and 'exclude' paths were '[]'.
typescriptVerifiedNo reports yet
bash: tsc: command not found (tool is installed in node_modules, not globally)
#64build.sh: line 1: tsc: command not found
nodenpmtypescriptVerifiedNo reports yet