Hi
I just install nodemon in order to use it with an express app i did:
sudo npm install nodemon -g
Then i try nodemon -h
I get zsh: command not found: nodemon
I change npm's default directory to another directory following this link https://docs.npmjs.com/getting-started/fixing-npm-permissions, i mention this for if this is related.
I also have other global packages installed working fine, here is the list
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
Node version is: v0.10.40
npm version is: 2.13.2
Any idea what is happending, thanks for your time
Same problem with bash :/
You're not using sudo are you?
Usually not. But problem is strange, install other packages, like example grunt or bower, everything works. In this case not. %/
I'm facing same problem, I'm installing locally npm install --save-dev nodemon . I did try using the Sudo command to install. it correctly installed but still, problem persists.
-bash: nodemon: command not found
@Uttammgr your issue is unrelated to the first, but you've put nodemon in your local directory. As per docs, install as global if you want to run it on the CLI. The way you've done it, you can run it from scripts (mentionedβ¦sort ofβ¦here).
i.e. it's sitting in node_modules/.bin/nodemon.
@remy thank you for reminding, I completely ignored the global installation. Silly mistake
It can be solved by installing globally.
npm i -g nodemon
Even I got that issue when I was installing it in my local project.
@immoksh I tried, and my situation is,
I did install nodemon by npm i -g nodemon
when I check with npm list -g, I can see nodemon sit there, but still can't use nodemon to start server
my temporary solution is install nodemon locally inside the project
npm i --save nodemon
then I change in package.json
"start": "node_modules/.bin/nodemon app.js"
Nodemon: Command not found error in window 10
Mac: if you're using nvm make sure u installed nodemon for your version globally (if you're using different versions)
Most helpful comment
@immoksh I tried, and my situation is,
I did install
nodemonbynpm i -g nodemonwhen I check with
npm list -g, I can see nodemon sit there, but still can't use nodemon to start servermy temporary solution is install nodemon locally inside the project
npm i --save nodemonthen I change in package.json
"start": "node_modules/.bin/nodemon app.js"