Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Express Basics Getting Started with Express Creating a Route with Express

Johnny Austen
.a{fill-rule:evenodd;}techdegree seal-36
Johnny Austen
Front End Web Development Techdegree Graduate 35,482 Points

nodemon - command not found

Hey, Just trying to get nodemon working! Seems like installation worked alright, but I can't launch any nodemon commands (even nodemon -v)?

Here's my package.json file. Any ideas?

{ "name": "flashcards", "version": "1.0.0", "description": "", "main": "app.js", "scripts": { "devStart": "nodemon app.js" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "express": "^4.17.1" }, "devDependencies": { "nodemon": "^2.0.6" } }

if you added nodemon using npm scripts, you can run nodemon using the following command

npm run devStart

it will run the command the you defined in the package.json file under scripts.

1 Answer

Hi! I had similar issues where "nodemon" was not recognized as a command.

Perhaps you installed it locally.

From nodemon's GitHub page: "With a local installation, nodemon will not be available in your system path. Instead, the local installation of nodemon can be run by calling it from within an npm script (such as npm start) or using npx nodemon."