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
From you own project.
npx nodemon [your-app.js]
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
.
OR
Create a simple symbolik link
ln -s /Users/YourUsername/.npm-global/bin/nodemon /usr/local/bin
ln -s [from: where is you install 'nodemon'] [to: folder where are general module for node]
node : v12.1.0
npm : 6.9.0
sudo su
then
npm install nodemon
worked for me
Just writing what did worked for me - (on Windows machine, installing node locally to the project) if you do not want to install it globally (i.e without -g flag) you have to use
npx nodemon app
where app is your app.js is your program file to launch.
In Windows git bash, I fixed it by restarting git bash
I'm using macOS/Linux, the solution that works for me is
npx nodemon index.js
I have tried every possibility, like uninstalling and installing nodemon, installing nodemon globally. restart the terminal, but it won't work.
don't try such things to waste your time.
Put --exec
arg in single quotation
.
e.g. I changed "nodemon --exec yarn build-langs"
to "nodemon --exec 'yarn build-langs'"
and worked.