title: permission denied while trying to create leading directories of git clone
body: <p>Whenever I try to run <code>npm install</code> on my app, I get the following error:</p>
  
  <pre><code>Eliyas-MacBook-Pro:app-name root# npm install
  npm ERR! code 128
  npm ERR! Command failed: /usr/bin/git clone -q https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git /var/root/.npm/_cacache/tmp/git-clone-31357d5e
  npm ERR! fatal: could not create leading directories of '/var/root/.npm/_cacache/tmp/git-clone-31357d5e': Permission denied
  npm ERR! 
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /var/root/.npm/_logs/2018-02-27T20_18_34_759Z-debug.log
  </code></pre>
  
  <p>This is what I get when I check the permission of the <code>.npm</code> folder:</p>
  
  <pre><code>drwxrwxrwx   6 root  staff  192 Feb 27 22:11 .npm
  </code></pre>
  
  <hr>
  
  <p><strong>My environment:</strong></p>
  
  <ul>
  <li>git version 2.14.3 (Apple Git-98)</li>
  <li>node v9.4.0</li>
  <li>npm v5.4.0</li>
  </ul>