title: Node js npm installed global package cannot be called from terminal, tried everything
body: <p>I have installed some <code>node js</code> packages globally on my MAC.</p>
  
  <p>I run <code>$sudo npm install -g jshint</code> in my terminal at my root directory which is <code>/Users/apple/</code>.</p>
  
  <p>And I try to run <code>$jshint myfile.js</code>, but only got this error:</p>
  
  <pre><code>-bash: jshint: command not found
  </code></pre>
  
  <p>I have tried everything : </p>
  
  <ol>
  <li>added <code>NODE_PATH="/Users/apple/npm-global/lib/node_modules"</code></li>
  <li>Changed <code>$sudo chown apple /Users/apple/npm-global/</code></li>
  <li>Changed <code>$sudo chown apple /Users/apple</code></li>
  <li>Changed <code>$sudo chown apple /Users/apple/Tutorial/Nodejs/myfile.js</code></li>
  </ol>
  
  <p>Any ideas? Thanks in advance!</p>
  
  <p><br>
  EDIT<br>
  --------------------------------------<BR></p>
  
  <p>So I have reinstalled node js using brew, and I followed all the default folders which is <code>usr/local/</code> , but still, <code>$npm -g ls shows /usr/local/lib</code> and my jshint package is successfully installed in <code>/usr/local/lib</code>, run <code>$jshint, "-bash: jshint: command not found"...</code></p>