Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

Johnny Austen
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Johnny Austen
Front End Web Development Techdegree Graduate 35,494 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."