jack blank jack blank - 1 year ago 502
Node.js Question

Nodemon not working anymore . Usage: nodemon [nodemon options] [script.js] [args]

always worked for me. I always did
nodemon server
and it would run the server file and watch for updates and node would restart. But now when I do it, I get this in the cmd (I use windows):

Usage: nodemon [nodemon options] [script.js] [args]

See "nodemon --help" for more.

I tried uninstalling and reinstalling
globally but still get the feedback. now I have to restart the server with regular
on every update.

EDIT:: This is what it looke like when i type in
and press enter

05/29/2016 05:55 PM <DIR> .
05/29/2016 05:55 PM <DIR> ..
05/29/2016 05:35 AM <DIR> node_modules
05/29/2016 02:20 PM <DIR> public
05/24/2016 09:30 PM 2,836 server.js
05/29/2016 12:05 AM 3,513 server2.js
05/30/2016 12:41 AM 3,651 server3.js
05/29/2016 05:55 PM <DIR> views
3 File(s) 10,000 bytes
5 Dir(s) 650,802,348,032 bytes free

Answer Source

Are you sure your server file is in the folder you are in? Run dir and make sure the file you expect is in the directory before running the command. If the file you are trying to run is not present in the current directory, nodemon will spit out the usage message.

If your file is in the directory, try executing with the full file extension -- nodemon server.js

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download