likes
comments
collection
share

centos7 puppeteer Error: 安装失败

作者站长头像
站长
· 阅读数 24

报错:

code EINTEGRITY
npm ERR! sha512-mu/N4uvfDN2zVQQ5AYJI/g4qxn2bHB6521t1UuH09ShNWjebTqN0ZFuYK9uYjcgmI0dTQEs+Owi1EO6U0OkOZQ== integrity checksum failed when using sha512: wanted sha512-mu/N4uvfDN2zVQQ5AYJI/g4qxn2bHB6521t1UuH09ShNWjebTqN0ZFuYK9uYjcgmI0dTQEs+Owi1EO6U0OkOZQ== but got sha512-iiXaOL2wSbnSY4qg0mFPWJHL9iwyEsoNYwaHF2w58/fsVAQJlj+KUfFAFZu+nzbz+b7dUprJEAc+O9vhHHhQTA==. (3599 bytes)

三板斧

  1. 删除package.lock.json文件
  2. npm cache clean --force

安装失败是因为需要安装chrome,网络连接不通:

  1. 采用阿里云下载:
npm --registry https://registry.npm.taobao.org install