title: NPM Mac OS error: EACCES: permission denied, access '/usr/local/lib/node_modules'
body: <p>I'm trying to install gatsby-cli globally:</p>
  
  <pre><code>npm install -g gatsby-cli
  </code></pre>
  
  <p>I keep getting an access error and am not sure how to fix it. </p>
  
  <p><a href="https://i.stack.imgur.com/bHLmE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bHLmE.png" alt="enter image description here"></a></p>