Mac os npm install bower installed successfully

  node.js, question
julauddeMacBook-Pro:austack-core julaud$ sudo npm install -g bower
 Password:
 /usr/local/Cellar/node/4.2.1/libexec/npm/bin/bower -> /usr/local/Cellar/node/4.2.1/libexec/npm/lib/node_modules/bower/bin/bower
 bower@1.6.3 /usr/local/Cellar/node/4.2.1/libexec/npm/lib/node_modules/bower
 julauddeMacBook-Pro:austack-core julaud$ bower
 -bash: bower: command not found
 julauddeMacBook-Pro:austack-core julaud$ ls
 README.md        gulp            qiniu_cfg
 bin            gulpfile.js        sampleapps
 bower.json        karma.conf.js        server
 build.xml        node_modules        test
 client            package.json
 e2e            protractor.conf.js
 julauddeMacBook-Pro:austack-core julaud$ bower install
 -bash: bower: command not found

Bower has been installed globally and can be operated, but cannot be found?

Ask the great god for guidance

The/usr/local/Cellar/node/4.2.1/libexec/npm/binThis path can be added to $PATH. Since the executable program will create a soft links under the package normally installed with npm, these commands can be used directly. But I don’t know why your directory is not in $PATH.

This can solve the problem. However, you suggest that you use nvm to install npm. Before that npm can be ignored. If curl is installed, there is no need to change anything, directlycurl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash. Then the bin of your npm should be automatically added to $PATH. Reference:github