If you’re trying to run nodemon from the terminal and see the error:
nodemon: command not found, it usually means the nodemon package is not installed globally or your terminal can’t find it in your system’s PATH.

Solution 1: Install nodemon Globally

You can install nodemon globally:

npm install -g nodemon

This makes it available system-wide so you can run nodemon from any directory.

Solution 2: Use npx (No Global Install Needed)

If you don’t want a global install:

npx nodemon app.js

This uses the version in your project’s node_modules folder (if installed).

Solution 3: Check Your PATH

Make sure your global npm path is in your system’s PATH. To find it:

npm config get prefix

Make sure the output (e.g., /usr/local/bin) is in your terminal’s PATH variable.

Solution 4: Use nodemon as an NPM Script

Add this to your package.json:

“scripts”: {“dev”: “nodemon app.js”

}

Run with:

npm run dev

Conclusion

Install nodemon globally, use npx, or run it via npm scripts to avoid “command not found” issues in Bash.