title: npm install throws "integrity checksum failed when using sha1: wanted sha1-6G...= but got sha512..." error
body: <p>I checked few similar posts on here and other places but was not able to figure out.  Never done Angular but got instructed to install npm and run an angular project I never used before.  Here are the details</p>
  
  <p>On my MacBookPro, I have an existing Angular project I never worked in before.  I open it in VSCode and here is the structure</p>
  
  <p><a href="https://i.stack.imgur.com/AExKZm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AExKZm.png" alt="enter image description here"></a></p>
  
  <p>If I check version of my npm, I get following:</p>
  
  <p><strong>Node 10.8.0</strong></p>
  
  <p><strong>npm 6.2.0</strong></p>
  
  <p>, then I go to the parent folder of the <strong>src</strong> folder (so folder that contains the <strong>src</strong> folder) and issue:</p>
  
  <pre><code>npm install
  </code></pre>
  
  <p>, I get following output with the error.  Same error is in the log file generated:</p>
  
  <pre><code>mycomp:MyProj nbnex$ npm i
  WARN tarball tarball data for angular-tree-component@5.2.1 (sha1-6GFJ7dp3tKYSvYAb/EVjK+zOYGQ=) seems to be corrupted. Trying one more time.
  WARN tarball tarball data for angular-tree-component@5.2.1 (sha1-6GFJ7dp3tKYSvYAb/EVjK+zOYGQ=) seems to be corrupted. Trying one more time.
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/@angular-devkit/core/node_modules/fsevents):
  npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/Users/dbnex/source/MyProj/MyProj/node_modules/.staging/fsevents-d35eda14/node_modules/yallist' -&gt; '/Users/dbnex/source/MyProj/MyProj/node_modules/.staging/yallist-2c29e2bb'
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/watchpack/node_modules/fsevents):
  npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/Users/dbnex/source/MyProj/MyProj/node_modules/.staging/fsevents-6a393e92/node_modules/set-blocking' -&gt; '/Users/dbnex/source/MyProj/MyProj/node_modules/.staging/set-blocking-5346d4b2'
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/webpack-dev-server/node_modules/fsevents):
  npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename '/Users/dbnex/source/MyProj/MyProj/node_modules/.staging/fsevents-a915511c/node_modules/process-nextick-args' -&gt; '/Users/dbnex/source/MyProj/MyProj/node_modules/.staging/process-nextick-args-7b3b7565'
  
  npm ERR! code EINTEGRITY
  npm ERR! Verification failed while extracting angular-tree-component@5.2.1:
  npm ERR! Verification failed while extracting angular-tree-component@5.2.1:
  npm ERR! sha1-6GFJ7dp3tKYSvYAb/EVjK+zOYGQ= integrity checksum failed when using sha1: wanted sha1-6GFJ7dp3tKYSvYAb/EVjK+zOYGQ= but got sha512-EUet5nra7Ia1J4AkdJR6ToUFZHPbN9uybPpv+wx5/jo8lch5ezvh/5MQSShxIeU2bvsv4YpcSqgEq/6iBBfgpQ== sha1-dRAb4fP7cqda60ct3CvKQ5zMJxY=. (178201 bytes)
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /Users/dbnex/.npm/_logs/2018-10-05T18_04_47_761Z-debug.log
  </code></pre>