"command not found: npm" (or node): what it means and how to fix it
npm is a program that comes with Node.js. If the terminal says it cannot find npm or node, either Node.js was never installed on this computer, or the terminal does not know where it was put (its PATH).
The error looks like this:
command not found: npm
How to fix it
- Check what is installed. Run
node -vandnpm -v. If both print a version number, the problem is somewhere else (such as the folder you are in). - Install Node.js. If they print "not found", install Node.js. The npm docs say the installers put in both Node.js and npm, and they recommend a version manager such as nvm because installers can cause permission trouble with global packages later.
- Open a new terminal window. A terminal that was already open before the install does not see the change. Close it, open a new one, and run
node -vandnpm -vagain. - Still not found? Check your PATH. Your computer keeps a list of folders to search for programs. If you used a version manager, make sure its setup line was added to your shell config and that you opened a fresh terminal.
What you should see
node -v and npm -v each print a version number, and npm install starts working in your project folder.
Not fixed? Bring the exact message to Bilo and we will look at it with you.
Still stuck? Paste your error into BiloQuick questions
Do I install npm separately?
No. The npm docs say installing Node.js installs npm too. Check with npm -v.
It says "not recognized" on Windows. Same thing?
Yes, it is the Windows wording for the same problem: the program is not installed or not on the PATH. Install Node.js and open a new terminal.
How do I update npm later?
The npm docs give npm install -g npm.
Sources and date checked
- npm: Downloading and installing Node.js and npm: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm (checked 2026-11-01)
Written in our own words from the official pages above. Tool names are only references; we are not affiliated with them. Commands change between versions, so check the linked docs if something differs.