KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am being more cautious than usual because I have been confused by the behavior of npm in the past. I am on a Mac and have installed node.js through brew install node . Now that I want to run jslint.js on the command-line as the command jslint I find that the canonical way to accomplish this is sudo npm install -g jslint which ran successfully with this output: $ sudo npm install -g jslint npm http GET https://registry.npmjs.org/jslint npm http 200 https://registry.npmjs.org/jslint npm http GET https://registry.npmjs.org/jslint/-/jslint-0.1.9.tgz npm http 200 https://registry.npmjs.org/jslint/-/jslint-0.1.9.tgz npm http GET https://registry.npmjs.org/nopt npm http 200 https://registry.npmjs.org/nopt npm http GET https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz npm http 200 https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz npm http GET https://registry.npmjs.org/abbrev npm http 200 https://registry.npmjs.org/abbrev npm http GET https://registry.npmjs.org/abbrev/-/abbrev-l.0.4.tgz npm http 200 https://registry.npmjs.org/abbrev/-/abbrev-1.0.4.tgz /usr/local/share/npm/bin/jslint -> /usr/local/share/npm/lib/node_modules/jslint/ bin/jslint.js jslint@0.1.9 /usr/local/share/npm/lib/node_modules/jslint └── nopt@1.0.10 (abbrev@1.0.4) Subsequently $ jslint ply.js zsh: command not found: jslint due to /usr/local/share/npm/bin not being in my $PATH . 1) Why did brew not install global npm bin path to path? Maybe it did, but something zsh does is messing it up. Where might I be able to find that? 2) Should I do this? (Append :/usr/local/share/npm/bin to the exported $PATH at the bottom of my ~/.zshrc ) It seems like this isn't the right way to do it because if I install something else later
Tags (comma-separated)
Save Edits
Cancel