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 trialsalcido
6,184 PointsUnable to start nodemon after installing: command not found: nodemon
I ran npm install -g nodemon
as shown in the video but when I try to start it with nodemon
I get this error:
command not found: nodemon
I also tried sudo npm install -g nodemon
with no luck either.
2 Answers
salcido
6,184 PointsI'm simply using nodemon
since I have
"main": "app.js",
defined in my package.json file.
I tried with nodemon app.js
but I still get the same error.
Stephan Olsen
6,650 PointsTry to see if it is installed by using:
npm view nodemon version
salcido
6,184 PointsHi Stephan,
Thanks for the reply. When I run the above command I get 1.12.0
.
Stephan Olsen
6,650 PointsWhat is the exact command you're using? When you use nodemon, you need to specify the entry point. So it should be something like
nodemon app
Hunter Phillips
9,310 PointsHunter Phillips
9,310 PointsFor nodemon to work, in my case, 'app.js' is inside of 'src' so I needed
"main": "src/app.js",