NPM 错误:EINTEGRITY:完整性校验和使用 sha 512 失败

Posted

技术标签:

【中文标题】NPM 错误:EINTEGRITY:完整性校验和使用 sha 512 失败【英文标题】:NPM ERROR: EINTEGRITY: Integrity checksum failed using sha 512 【发布时间】:2020-12-27 09:08:21 【问题描述】:

运行 npm install 命令时遇到此问题。几乎在论坛上尝试了关于强制清理缓存、清理 npm 安装并删除 node_modules 和 package-lock.json 等的所有内容。

没有任何工作。希望了解根本原因以及我能做些什么。调试日志如下:

lerna ERR! npm run precommit exited 1 in '<folder>'
husky > pre-commit hook failed (add --no-verify to bypass)
PS C:\Users\T955082\Documents\GitHub\cio-iof-bird-ui\packages\cio-iof-bird-report-ui> npm install
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted "os":"darwin","arch":"any" (current: "os":"win32","arch":"x64")
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted "os":"darwin","arch":"any" (current: "os":"win32","arch":"x64")

npm ERR! code EINTEGRITY
npm ERR! sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA== integrity checksum failed when using sha512: wanted sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA== but got sha512-qILHacp4rxtTdIkkEvz0OdxpExfzZ0zlqJ0rBUx1RFmSH86OtRpKIprmsFrfCS837gV9yDDyQqdxD8diFsKqwQ==. (64727 bytes)

【问题讨论】:

【参考方案1】:

尝试npm cache verify,如果不起作用npm clean

来自https://www.ludofischer.com/blog/npm-cache-error/

【讨论】:

以上是关于NPM 错误:EINTEGRITY:完整性校验和使用 sha 512 失败的主要内容,如果未能解决你的问题,请参考以下文章

npm ERR! code EINTEGRITY处理

npm ERR! code EINTEGRITY处理

当我运行`npm install`时,它返回`ERR!代码 EINTEGRITY` (npm 5.3.0)

npm安装cnpm时候报错code EINTEGRITY

npm ERR! code EINTEGRITY问题解决方案

npm ERR! code EINTEGRITY