Shell commands for node modules that are not in transit on Mac OSX

In Ubuntu, if I install a module, for example:

npm install nodemon -g

I have a team nodemonin$path

Mac OSX is nodemonnot in $path...

Any clues?

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

+5
source share
6 answers

Try installing it globally:

sudo npm install nodemon -g

If this does not work, add /usr/local/binto yours $PATH.

+6
source

Mac. , ( sudo), /usr/local/share/npm/bin . bash, . vim ~/.bash_profile, :

export PATH=${PATH}:/usr/local/share/npm/bin

, .

, $PATH,/usr/local/bin , , npm Mac ( , Mac, Linux).

+3

node , ~/.config/fish/config.fish

set PATH /usr/local/Cellar/node/6.6.0/bin/ $PATH
+1

? . nvm (node )? , -

Users/maxl/.nvm/v0.10.4/bin

echo $PATH
0

. , , , RVM gemset. node, , npm install -g grunt-contrib-compass.

which compass, , ! - ??? , NPM RVM ( ) gemset! -g .

rvm --force gemset delete appname . , , . , .

0

, nvm, :

nvm install stable
nvm use stable
nvm alias default stable

, npm config get prefix .

0
source

All Articles