When I run `npm install`, it returns with `ERR! code EINTEGRITY` (npm 5.3.0)

后端 未结 27 1467
闹比i
闹比i 2020-11-28 02:29

I am getting this error while running sudo npm install. On my server, npm was installed earlier. I\'ve tried to delete the package-lock.json file,

相关标签:
27条回答
  • 2020-11-28 02:39

    Try the following:

    npm cache clean --force
    

    This has worked for me.

    0 讨论(0)
  • 2020-11-28 02:39

    This was not yet mentioned but make sure that your SYSTEM TIME is correct. If it is too out of sync it will cause a EINTEGRITY error. When you are doing npm publish / install.

    0 讨论(0)
  • 2020-11-28 02:40

    We had this problem multiple times in the company I work at. Deleting the node_modules folder from the .nvm folder fixed the problem:

    rm -rf ~/.nvm/versions/node/v8.6.0/lib/node_modules
    
    0 讨论(0)
  • 2020-11-28 02:42

    I had the same issue. I used yarn instead of npm to install the dependencies and it worked.

    yarn add *****
    
    0 讨论(0)
  • 2020-11-28 02:42

    I faced this issue. It was my network connectivity. I changed network (from Broadband WiFi to 4G WiFi) and tried. It worked.

    My broadband ISP was blocking all http requests. That might be the reason I guess in my case.

    0 讨论(0)
  • 2020-11-28 02:44

    I was stuck at this for a long time and this is what helped me.

    Try this:

    npm cache clean --force
    npm install --update-binary --no-shrinkwrap
    

    Found this answer after digging into GitHub issues!!

    0 讨论(0)
提交回复
热议问题