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

后端 未结 27 1408
闹比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:29

    This Worked for me . open the project in CMD the run

    npm cache verify 
    npm install 
    npm start
    
    0 讨论(0)
  • 2020-11-28 02:30

    There are several valid and helpful responses here, but I would like to add that in my case the simplest solution was:

    1. Delete package-lock.json;
    2. Remove folder AppData\Local\npm\cache or AppData\Roaming\npm\cache;
    3. Remove folder node_modules.staging;
    4. Run npm install again.

    After that everything ran smoothly.

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

    I am behind my organization's proxy, running the following commands fixed the issue for me

    npm config set proxy http://proxy.yourproxydomain.com:port
    npm config set https-proxy http://proxy.yourproxydomain.com:port
    npm config set strict-ssl false
    npm config set registry https://registry.npmjs.org/
    
    0 讨论(0)
  • 2020-11-28 02:35

    Actually the above is related to the network connectivity in side the server. When I've good connectivity in the server, the npm install gone good and didn't throw any error

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

    I was using private npm registry and trying to install private npm module. Logging to npm local registry fixed it (used command npm --add-user)

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

    SherylHohman's answer solved the issue I had, but only after I switched my internet connection. Intitially, I was on the hard-line connection at work, and I switched to the WiFi connection at work, but that still didn't work.

    As a last resort, I switched my WiFi to a pocket-WiFi, and running the following worked well:

    npm cache verify
    
    npm install -g create-react-app
    
    create-react-app app-name
    

    Hope this helps others.

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