Brian Wigginton Lab and Nerdery

npm jshint – command not found after install

Posted on October 20, 2012

I was getting a new machine up and running and decided to play with zsh. Later that evening I was going to write some JavaScript and wanted to lint my code with the handy jshint tool. So I installed it with NPM:

$ npm install jshint -g

And was then greeted with a command not found error:

$ jshint
zsh: correct jslint to slit [nyae]? n
zsh: command not found: jslint

Turns out I needed to add the npm bin directory to my PATH, as it didn't get added there automatically since I installed zsh after node/npm.

export PATH="/usr/local/share/npm/bin:${PATH}"
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

 

No trackbacks yet.

Google+