title: gyp WARN EACCES user "root" does not have permission to access the dev dir
body: <p>Trying to </p>
  
  <pre><code>sudo npm install protractor -g
  </code></pre>
  
  <p>and the same notorious error/warning again (googled to no avail):</p>
  
  <pre><code>gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/dmitrizaitsev/.node-gyp/0.12.0"
  </code></pre>
  
  <p>What seems to happen is that <code>node version 0.12.0</code> is downloaded and rebuilt, again and again during the same installation, despite of being the current node version on my machine:</p>
  
  <pre><code>node -v
  v0.12.0
  </code></pre>
  
  <p>Questions:</p>
  
  <ul>
  <li><p>The directory "/Users/dmitrizaitsev/.node-gyp/0.12.0" is actually missing! Why such a misleading message?</p></li>
  <li><p>Why was this directory not created neither during the <code>node v0.12.0</code> nor during the previous successful rebuild with <code>node-gyp</code>?</p></li>
  <li><p>(Obviously) How can I prevent this from happening?</p></li>
  </ul>
  
  <p>I run Mac OSX 10.8.5 if that is of any importance.</p>