I\'m on a Mac running El Capitan. I have node v5.6.0 and npm v3.6.0. When I try to run nodemon, I get:
-bash: nodemon: command not found
I th
Make sure you own root directory for npm so you don't get any errors when you install global packages without using sudo.
procedures:- in root directory
sudo chown -R yourUsername /usr/local/lib/node_modules
sudo chown -R yourUsername /usr/local/bin/
sudo chown -R yourUsername /usr/local/share/
So now with
npm i npm -g
you get no errors and no use of sudo here. but if you still get errors confirm node_modules is owned again
/usr/local/lib/
and make sure you own everything
ls -la
now
npm i -g nodemon
will work!