Home > Mobile >  Node_Modules folder vanishes after 'npm install'
Node_Modules folder vanishes after 'npm install'

Time:09-17

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 truffle-hdwallet-provider@0.0.3: WARNING: This package has been renamed to @truffle/hdwallet-provider.
npm WARN deprecated uuid@3.3.2: 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 uuid@3.4.0: 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 mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, 
please switch to that.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated ethereumjs-tx@1.3.7: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated ethereumjs-block@2.2.2: New package name format for new versions: @ethereumjs/block. Please update.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm WARN deprecated multibase@0.6.1: This module has been superseded by the multiformats module
npm WARN deprecated ethereumjs-tx@2.1.2: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated multicodec@0.5.7: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@1.0.4: This module has been superseded by the multiformats module
npm WARN deprecated ethereumjs-tx@1.3.7: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated ethereumjs-vm@2.6.0: New package name format for new versions: @ethereumjs/vm. Please update.
npm WARN deprecated ethereumjs-block@1.7.1: New package name format for new versions: @ethereumjs/block. Please update.
npm WARN deprecated ethereumjs-common@1.5.2: New package name format for new versions: @ethereumjs/common. Please update.
npm WARN deprecated cids@0.7.5: 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>

CodePudding user response:

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.

CodePudding user response:

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.

  • Related