4

Getting some weird behavior whenever I run my 'npm install' command on my project on a new computer. My node_modules folder vanishes upon completion of my install command. Any help is appreciated!

Here is the log:

PS C:\Dev\eth> npm i

npm WARN deprecated [email protected]: WARNING: This package has been renamed to @truffle/hdwallet-provider.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, 
please switch to that.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/block. Please update.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/vm. Please update.
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/block. Please update.
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/common. Please update.
npm WARN deprecated [email protected]: This module has been superseded by the multiformats module
npm WARN tarball tarball data for bignumber.js@git+ssh://[email protected]/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2 (sha512-rjbVI8RX9gb0ly+xdEF9qu6Xq7c8uAurfHK7nt/sAtyYKdv7zKYv9zGk/dg+Ofyy+rgdDYpp1qIsI19pubVjAg==) seems to be corrupted. Trying again.
npm WARN tarball tarball data for bignumber.js@git+ssh://[email protected]/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2 (sha512-rjbVI8RX9gb0ly+xdEF9qu6Xq7c8uAurfHK7nt/sAtyYKdv7zKYv9zGk/dg+Ofyy+rgdDYpp1qIsI19pubVjAg==) seems to be corrupted. Trying again.
npm ERR! code EINTEGRITY
npm ERR! sha512-rjbVI8RX9gb0ly+xdEF9qu6Xq7c8uAurfHK7nt/sAtyYKdv7zKYv9zGk/dg+Ofyy+rgdDYpp1qIsI19pubVjAg== integrity checksum failed when using sha512: wanted sha512-rjbVI8RX9gb0ly+xdEF9qu6Xq7c8uAurfHK7nt/sAtyYKdv7zKYv9zGk/dg+Ofyy+rgdDYpp1qIsI19pubVjAg== but got sha512-k55rLoPK7DNCwjO/+Esh5n3lNF+lKwzfIIak1alqxXhrXsInC69JJKwEjAyCB8+IehSFkObzxzzu9URR+Q4pyA==. (63471 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Ericm\AppData\Local\npm-cache\_logs\2021-09-14T17_35_53_844Z-debug.log

PS C:\Dev\eth>

Joe
  • 41,484
  • 20
  • 104
  • 125
EM_Dev
  • 177
  • 2
  • 11

2 Answers2

2

You may have a package cached and it's failing the checksum comparison, you can try:

$ cd <project_directory>
$ rm -rf package-lock.json npm-shrinkwrap.json node_modules
$ npm cache clean --force
$ npm cache verify
$ npm install

or look here: When I run `npm install`, it returns with `ERR! code EINTEGRITY` (npm 5.3.0)

Since you're building something with Crypto I'd be extra cautious and ensure that this is in fact just an error/false positive and not a malicious package failing the checksum. Very low chance of the latter, but I'd pay a little extra attention at this step.

Tom Foster
  • 462
  • 2
  • 10
0

Figured it out. Looks like I had an issue with my Package-lock.json file within my project. Not sure what in particular caused the issue but deleting that folder and re-running npm install fixed my issue.

EM_Dev
  • 177
  • 2
  • 11