Npm ERR code EINTEGRITY

I am unable to build a node web service due to an npm EINTEGRITY error upon npm install. I have built the same service

I deployed another service where the same set of decencies was successfully installed. This service had previously installed packages and deployed successfully. The super strange part is that a re-deploy of the same commit suddenly failed although it had succeeded.

Does anyone have any suggestions on how to troubleshoot the error?

==> Downloading cache...
==> Downloaded 151MB in 4s. Extraction took 3s.
==> Detected Node version 16.14.2
==> Running build command 'npm --version && npm cache verify && npm install'...
8.5.0
Cache verified and compressed (~/.cache/_cacache)
Content verified: 2642 (104902549 bytes)
Content garbage-collected: 202 (2954244 bytes)
Missing content: 202
Index entries: 3134
Finished in 19.365s
npm ERR! code EINTEGRITY
npm ERR! sha512-KmmtiSg01F5PVtgl/nOhU7Lz2oSPGhv7lKSlqlbtUZCqa2JhvTnl0UVlzKAmTPDv/sYe6r8ol2e6pMg0paHObw== integrity checksum failed when using sha512: wanted sha512-KmmtiSg01F5PVtgl/nOhU7Lz2oSPGhv7lKSlqlbtUZCqa2JhvTnl0UVlzKAmTPDv/sYe6r8ol2e6pMg0paHObw== but got sha512-pKdx3EQ3IuGCN6a+8I68W0BmSnZKKcJ6O8nOMHDL47N9j0ppwkj/SIy/KZ3DHHMre+HjozYod/NKhTYbTyaJsQ==. (793653 bytes)
npm ERR! A complete log of this run can be found in:
npm ERR!     /opt/render/.cache/_logs/2022-05-18T19_09_35_401Z-debug-0.log
==> Build failed 😞

Hi @sealocal,

Are you able to try clearing the build cache and redeploying? This option should be available under the Manual Deploy button. Let me know if you’re still running into issues after doing so.

I tried clearing the build cache under the Manual Deploy button, but the same error occurs.

Hi @sealocal,

Thanks for giving that a try. It seems that there is a related thread on the error here, providing some solutions, which seem to vary in effectiveness between different users: https://github.com/npm/npm/issues/16861#issuecomment-305527498

From what I understand, it sounds like one of your installed packages may be outdated, or perhaps if it was modified locally, but appears to have a different signature from the published package.

I do see that you’ve been trying some of the solutions provided on that thread. It might also be helpful to cross-reference the sha provided in the error message with your package-lock.json to identify which package is causing the issue as well.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.