npm / cli

the package manager for JavaScript
https://docs.npmjs.com/cli/
Other
8.44k stars 3.14k forks source link

[BUG] sha512 error..? #960

Closed Danbuhr closed 4 years ago

Danbuhr commented 4 years ago

What / Why

Ran npm i yesterday night, on this simple demo project. Today, I get errors doing the same "npm i" on the same project on a different machine.

When

Trying to install node modules.

Where

Same same but different.. machine.

How

Current Behavior

3142 silly fetchPackageMetaData error for @react-pdf/pdfkit@^1.4.2 Invalid response body while trying to fetch https://registry.npmjs.org/@react-pdf%2fpdfkit: Integrity verification failed for sha512-uQqXV8HyI9G/ov+5ChlsiXBjwjLc1gBAIopuA6VtqEm6d2ESDZyfG9dSH8xWMNqPbktoIExC64tBI+Jq4NJd6A== (C:\Users\someuser\AppData\Roaming\npm-cache_cacache\content-v2\sha512\b9\0a\9757c1f223d1bfa2ffb90a196c897063c232dcd60040228a6e03a56da849ba7761120d9c9f1bd7521fcc5630da8f6e4b68204c42eb8b4123e26ae0d25de8) 3143 silly fetchPackageMetaData error for blob-stream@^0.1.3 Invalid response body while trying to fetch https://registry.npmjs.org/blob-stream: Integrity verification failed for sha512-mHSL4m7rHRa9yJMUSzjzORHAUbbwrsceIHXA+S4eWBlYAxVg1nVvZYsx1O4QEU3FM1FtKuWIDCc6sXa32tUHLw== (C:\Users\someuser\AppData\Roaming\npm-cache_cacache\content-v2\sha512\98\74\8be26eeb1d16bdc893144b38f33911c051b6f0aec71e2075c0f92e1e581958031560d6756f658b31d4ee10114dc533516d2ae5880c273ab176b7dad5072f) 3144 silly fetchPackageMetaData error for media-engine@^1.0.3 Invalid response body while trying to fetch https://registry.npmjs.org/media-engine: Integrity verification failed for sha512-OC9nNPhk07k6+8soxPh+tbPGA3hwZ1wCAT6Nd4zgP0RLS+P4cDxhnzqBjfgmQFReBhEwZRm7E2YSgEdx+rXExQ== (C:\Users\someuser\AppData\Roaming\npm-cache_cacache\content-v2\sha512\38\2f\6734f864d3b93afbcb28c4f87eb5b3c6037870675c02013e8d778ce03f444b4be3f8703c619f3a818df82640545e0611306519bb136612804771fab5c4c5) 3145 silly fetchPackageMetaData error for page-wrapping@^1.1.0 Invalid response body while trying to fetch https://registry.npmjs.org/page-wrapping: Integrity verification failed for sha512-TnK0EjA33v0rOy26sQIf8ZRGPQs2mER6RISSapMc8vkaWhq38DAO7AF4zCnpY27Lf4qxzqcFnm2DBJSHh+VtVA== (C:\Users\someuser\AppData\Roaming\npm-cache_cacache\content-v2\sha512\4e\72\b4123037defd2b3b2dbab1021ff194463d0b3698447a4484926a931cf2f91a5a1ab7f0300eec0178cc29e9636ecb7f8ab1cea7059e6d8304948787e56d54) 3146 silly fetchPackageMetaData error for yoga-layout-prebuilt@^1.9.3 Invalid response body while trying to fetch https://registry.npmjs.org/yoga-layout-prebuilt: Integrity verification failed for sha512-XjOV63YSG4xBAxeh2PaYSNCSyWUwNbyPjS6lzTS5tofTELVnx10tEHzvwnlAowGpSmK8KJ7oYmDjHf5TMbkACg== (C:\Users\someuser\AppData\Roaming\npm-cache_cacache\content-v2\sha512\5e\33\95eb76121b8c410317a1d8f69848d092c9653035bc8f8d2ea5cd34b9b687d310b567c75d2d107cefc27940a301a94a62bc289ee86260e31dfe5331b9000a) 3147 silly fetchPackageMetaData error for react-reconciler@^0.21.0 Invalid response body while trying to fetch https://registry.npmjs.org/react-reconciler: Integrity verification failed for sha512-wbtak/M8pNZsEal/Lpf4/kNVDWMdb1NJuVoR5RN0q6nDpeZ4+F8WSka671V3He8CC+S/OoQI2hCHbOyHanP7ig== (C:\Users\someuser\AppData\Roaming\npm-cache_cacache\content-v2\sha512\c1\bb\5a93f33ca4d66c11a97f2e97f8fe43550d631d6f5349b95a11e51374aba9c3a5e678f85f164a46baef55771def020be4bf3a8408da10876cec876a73fb8a) 3148 silly fetchPackageMetaData error for scheduler@^0.15.0 Invalid response body while trying to fetch https://registry.npmjs.org/scheduler: Integrity verification failed for sha512-9ntllNvKYfUfNj5FwFD4IzNvAgCJ71Sef58gxY+EWHD8/TFicllEUlOtBXHEh5K27U4B1LDL6QqaGZk00mq+Xg== (C:\Users\someuser\AppData\Roaming\npm-cache_cacache\content-v2\sha512\f6\7b\6594dbca61f51f363e45c050f823336f020089ef549e7f9f20c58f845870fcfd31627259445253ad0571c48792b6ed4e01d4b0cbe90a9a199934d26abe5e) 3149 silly fetchPackageMetaData error for @react-pdf/textkit@^0.3.7 Invalid response body while trying to fetch https://registry.npmjs.org/@react-pdf%2ftextkit: Integrity verification failed for sha512-TkdWvBMtYYOuBzr189NBnri04iEOohViJH8bJ9Jm6ihEfmjs/IY661wRgOcnF0zQpPYBas+xY36TCtWFH+WWwQ== (C:\Users\someuser\AppData\Roaming\npm-cache_cacache\content-v2\sha512\4e\47\56bc132d6183ae073af5f3d3419eb8b4e2210ea21562247f1b27d266ea28447e68ecfc863aeb5c1180e727174cd0a4f6016acfb1637e930ad5851fe596c1) 3150 timing npm Completed in 12602ms

Steps to Reproduce

Try to add these libs to package.json:

"@david.kucsai/react-pdf-table": "^0.3.0",
"@react-pdf/renderer": "^1.6.8",

Expected Behavior

Npm should fetch the packages needed..?

Who

References

See the above details, I guess :)

Danbuhr commented 4 years ago

Found a problem in the local cache, that didn't self-heal.

Solution:

  1. npm cache verify
  2. npm cache clean -force
  3. npm i
elliotvaucher commented 8 months ago

@Danbuhr : thanks.

For info, when running npm cache verify I got the following message :

npm ERR! Your cache folder contains root-owned files, due to a bug in npm ERR! previous versions of npm which has since been addressed. npm ERR! npm ERR! To permanently fix this problem, please run: npm ERR! sudo chown -R 501:20 "/Users//.npm"

Running the proposed command did the job.