Command Not Found Error
Fix 'command not found' errors in terminal and CLI. Learn how to fix PATH issues, install missing tools, and use npx for Node.js packages.
What Does This Error Mean?
The 'command not found' error means your shell cannot find an executable with that name in any of the directories listed in the PATH environment variable.
Common Causes
The software is not installed on your system
The software is installed but not in your PATH
PATH variable is misconfigured or missing common directories
Node.js/npm installed but not added to PATH (Windows)
Using a command that requires a different shell or environment
Typo in the command name
How to Fix It
Check if the command is installed
Use which or where to check if the command exists anywhere.
# Linux/macOS: check if command is available which node which npm # Windows where node where npm # If not found, install it # Node.js: https://nodejs.org
Fix PATH configuration
Add common binary directories to your PATH.
# Linux/macOS: add to ~/.bashrc or ~/.zshrc export PATH="$PATH:/usr/local/bin" export PATH="$PATH:$HOME/.npm-global/bin" export PATH="$PATH:./node_modules/.bin" # Windows: add to system PATH via GUI # System Properties → Environment Variables → PATH # Add: C:\Program Files\nodejs\
Use npx for Node.js packages
npx runs Node.js packages without installing them globally.
# Instead of installing globally npm install -g create-react-app create-react-app my-app # Use npx instead (no global install) npx create-react-app my-app # Other examples npx prettier --write . npx eslint . npx tsc --init
Related Tools
Use these tools to debug and fix this error:
Related Errors
Other common errors in this category:
401 Unauthorized Error
Learn what a 401 Unauthorized error means, common causes, and how to fix authentication failures in your web applications.
403 Forbidden Error
Learn what 403 Forbidden means, how it differs from 401, and how to fix access denied errors in your applications.
404 Not Found Error
Learn what 404 Not Found means, common causes, and how to fix broken links and missing resources on your website or API.
429 Too Many Requests Error
Learn what 429 Too Many Requests means, how rate limiting works, and how to handle or avoid hitting API rate limits.