qwerty qwerty - 3 months ago 77
Node.js Question

Unable to install nodemon node.js

I am having issue installing nodemon on OSX 10.11.5. Once I run the command (either 'npm install -g nodemon' or adding sudo), I am getting '-bash: nodemon: command not found' error.

I get the following when I install nodemon:

fsevents@1.0.14 install /Users/oioi/.node/lib/node_modules/nodemon/node_modules/chokidar/node_modules/fsevents
node-pre-gyp install --fallback-to-build

[fsevents] Success:
already installed

Pass --update-binary to reinstall or --build-from-source to recompile
/Users/oioi/.node/bin/nodemon ->
nodemon@1.11.0 /Users/oioi/.node/lib/node_modules/nodemon

I tried passing '-update-binary' to reinstall or '--build-from-source', as well as cleaning cache, restarting terminal, updating my path and nothing worked. I suspect that when I run 'npm delete nodemon', it does not delete duplicated version, but I have no idea how to fix it.

Is anyone able to help?


The nodemon executable is installed in a non-standard location (probably because you installed Node using Homebrew):


Which means that you either need to add /Users/oioi/.node/bin/ to your $PATH, or call the executable with the full path:

/Users/oioi/.node/bin/nodemon my-app.js