npm ERR! code EINTEGRITY
npm ERR! sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== integrity checksum failed when using sha512: wanted sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg== but got sha512-2lGfU4gymmhXRUiPLeQlnlkMaSY8azJB9W8e/vFp44AlAOEvzf6XiBUoTHO9NBM4OVlehybxDM9B4SwLBh42mw==. (10271 bytes)
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mac/.npm/_logs/2019-09-03T02_54_23_524Z-debug.log
下载npm包的时候,会进行包的哈希检测,以防下载的包被人恶意篡改,然而有时候因为cnpm与npm混用导致这个问题,可以通过以下步骤解决
删除package-lock.json,重新执行npm i
rm -r package-lock.json node-modules && npm cache clean --force && npm install
网友评论