美文网首页
npm ERR! code EINTEGRITY安装Cordov

npm ERR! code EINTEGRITY安装Cordov

作者: 告爬子 | 来源:发表于2017-11-14 19:20 被阅读56次

    错误信息大致样式如下:

    npm ERR!code EINTEGRITY

    npm ERR!sha1-Ppz8p24IMzIm82W8+HD3ffvVQs0= integrity checksum failed when using sha1: wanted sha1-Ppz8p24IMzIm82W8+HD3ffvVQs0= but got sha1-Aw5ElVYJsWBoK0sZbA2EUFuTz1k=. (130549 bytes)

    解决方法如下:

    1.终端下先运行 

    npm i -g npm

    再运行

    grep -ir "xxxxxxxxxx" ~/npm

    上面的xxxxxx是上面错误信息第二行中的 

    sha1-Ppz8p24IMzIm82W8+HD3ffvVQs0= integrity checksum failed when using sha1: wanted sha1-Ppz8p24IMzIm82W8+HD3ffvVQs0= but got sha1-Aw5ElVYJsWBoK0sZbA2EUFuTz1k=

    每个的报错信息都不一样,换上你自己的运行

    2.运行这些命令,估计总有一条可以治好你的err

    npm cache verify

    npm cache clean

    npm cache clean --force

    npm i -g npm

    grep -ir "sha1-xxxxxxxxxxxxxxxx" ~/.npm

    3.

    通过config命令

    npm configsetregistry https://registry.npm.taobao.org

    npm info underscore(如果上面配置正确这个命令会有字符串response)

    命令行指定

    npm--registry https://registry.npm.taobao.org info underscore

    编辑~/.npmrc加入下面内容

    registry=https://registry.npm.taobao.org

    我是到第三个才解决的,哎

    GitHub上面关于这个问题的网址:

    https://github.com/npm/npm/issues/16861

    相关文章

      网友评论

          本文标题:npm ERR! code EINTEGRITY安装Cordov

          本文链接:https://www.haomeiwen.com/subject/xawfvxtx.html