Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

shell commands of node modules not in path on Mac OSX

Tags:

node.js

macos

On Ubuntu, if I install a module like:

npm install nodemon -g

I have the command nodemon in the $path

On Mac OSX, nodemon is not in $path...

Any clues?

UPDATE: there is nothing /usr/local/bin, I also tried the same result with npm install nodemon -g

like image 401
Max L. Avatar asked May 01 '13 15:05

Max L.


People also ask

Where can I find node modules in Mac?

js main executables files -- node and npm -- are located on the /usr/local/bin folder.

Where are npm modules installed Mac?

The easiest way to know where the global modules are installed is to run the npm list -g command. On macOS computers, npm will be installed under /usr/local/bin/npm soft link path. The actual path to the npm package is under /usr/local/lib/node_modules . Any globally installed packages will end up in that path as well.

How do I fix zsh command not found npm Mac?

Fix npm command not found error on macOS or Linux First, you need to uninstall npm using the same method you installed it. If you use a package manager like Homebrew, then use brew uninstall node to remove it. Then you can install your NodeJS and npm using brew install node command.

How do I find the path of a command on a Mac?

On your Mac, click the Finder icon in the Dock to open a Finder window. Choose View > Show Path Bar, or press the Option key to show the path bar momentarily. The location and nested folders that contain your file or folder are displayed near the bottom of the Finder window.


1 Answers

Try installing it globally:

sudo npm install nodemon -g

If that doesn't work either, add /usr/local/bin to your $PATH.

like image 115
robertklep Avatar answered Sep 21 '22 12:09

robertklep