title: NPM "ENOENT: no such file or directory error" when installing Sails.js dependencies with Node 8.9.4 LTS
body: <p>I recently upgraded my computer and with it, to the latest LTS version of Node and NPM:</p>
  
  <ul>
  <li>Node.js 8.9.4</li>
  <li>NPM 5.6.0</li>
  </ul>
  
  <p>I have a Sails.js 0.12.14 application for which I'm trying to install NPM dependencies with <code>npm install</code> but when I do that, I get the following errors:</p>
  
  <pre><code>➜  web-service git:(feature/auth) ✗ npm install
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/pako-660dbb41/package.json'
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/pako-660dbb41/README.md'
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/pako-660dbb41/LICENSE'
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/pako-660dbb41/index.js'
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/pako-660dbb41/CHANGELOG.md'
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/camelCase.js'
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/uniqueId.js'
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/bindKey.js'
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/unnest.js'
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/bindAll.js'
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/unset.js'
  // a bunch of similar Lodash errors removed from here
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/T.js'
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/zipWith.js'
  WARN tar ENOENT: no such file or directory, open '/Users/Nag/Code/project/web-service/node_modules/.staging/lodash-6e6c9f2a/fp/lastIndexOfFrom.js'
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: oauth-sign@0.8.2 (node_modules/oauth-sign):
  npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: Cannot cd into '/Users/Nag/Code/project/web-service/node_modules/.staging/oauth-sign-b13c86db'
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: mkdirp@0.5.1 (node_modules/mkdirp):
  npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: Cannot cd into '/Users/Nag/Code/project/web-service/node_modules/.staging/mkdirp-c94c8047'
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: minimist@0.0.8 (node_modules/mkdirp/node_modules/minimist):
  npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: Cannot cd into '/Users/Nag/Code/project/web-service/node_modules/.staging/minimist-ba966a6e'
  
  npm ERR! path /Users/Nag/Code/project/web-service/node_modules/.staging/sails-02afd14e/node_modules/@sailshq/body-parser
  npm ERR! code ENOENT
  npm ERR! errno -2
  npm ERR! syscall rename
  npm ERR! enoent ENOENT: no such file or directory, rename '/Users/Nag/Code/project/web-service/node_modules/.staging/sails-02afd14e/node_modules/@sailshq/body-parser' -&gt; '/Users/Nag/Code/project/web-service/node_modules/.staging/@sailshq/body-parser-6d1e8405'
  npm ERR! enoent This is related to npm not being able to find a file.
  npm ERR! enoent
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /Users/Nag/.npm/_logs/2018-01-22T14_40_13_889Z-debug.log
  </code></pre>
  
  <p>I can't seem to figure out what's going on and can't find suitable answers anywhere else online. I even ran <code>npm cache clean --force</code>, <code>rm -rf node_modules</code> and retried with similar errors. It seemed to work fine when I was on Node ~6 but after upgrading to Node 8.9.4 and NPM 5.6.0, it just won't install my dependencies. How can I resolve this?</p>