Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

npm ERR! code EINTEGRITY (npm 5) #16861

Closed
@alfiepoleon

Description

@alfiepoleon

I'm opening this issue because:

  • npm is doing something I don't understand.

What's going wrong?

I deleted the node_modules and ran npm install, it won't finish installing. It throws the following error

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: method-override@2.3.9 (node_modules/method-override):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/Users/alfie/Dev/Play/react-native/huh/node_modules/.staging/method-override-b32cdc2a/HISTORY.md'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: pegjs@0.10.0 (node_modules/pegjs):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/Users/alfie/Dev/Play/react-native/huh/node_modules/.staging/pegjs-727ccbb8/examples/javascript.pegjs'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: rebound@0.0.13 (node_modules/rebound):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/Users/alfie/Dev/Play/react-native/huh/node_modules/.staging/rebound-febeaca0/docs/public/fonts/aller-bold.ttf'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: array-includes@3.0.3 (node_modules/array-includes):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/Users/alfie/Dev/Play/react-native/huh/node_modules/.staging/array-includes-ba916eb0/polyfill.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: minimist@0.0.10 (node_modules/optimist/node_modules/minimist):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, chmod '/Users/alfie/Dev/Play/react-native/huh/node_modules/.staging/minimist-01e15d57/test/dash.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: optimist@0.6.1 (node_modules/optimist):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/Users/alfie/Dev/Play/react-native/huh/node_modules/.staging/optimist-3fed5f8d/example/line_count.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: wordwrap@0.0.3 (node_modules/optimist/node_modules/wordwrap):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EEXIST: file already exists, mkdir '/Users/alfie/Dev/Play/react-native/huh/node_modules/.staging/wordwrap-95e82b04/test'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File exists: /Users/alfie/Dev/Play/react-native/huh/node_modules/.staging/wordwrap-95e82b04/test
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: parse5@1.5.1 (node_modules/parse5):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, open '/Users/alfie/Dev/Play/react-native/huh/node_modules/.staging/parse5-bbe9210b/lib/common/foreign_content.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: escope@3.6.0 (node_modules/escope):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, utime '/Users/alfie/Dev/Play/react-native/huh/node_modules/.staging/escope-fadd6a1e/lib/reference.js'

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)

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/alfie/.npm/_logs/2017-06-01T08_44_41_142Z-debug.log

my package.json

{
	"name": "huh",
	"version": "0.0.1",
	"private": true,
	"scripts": {
		"start": "node node_modules/react-native/local-cli/cli.js start",
		"test": "jest"
	},
	"dependencies": {
		"lodash": "^4.17.4",
		"moment": "^2.18.1",
		"react": "16.0.0-alpha.6",
		"react-native": "0.44.0",
		"react-native-animatable": "^1.2.0",
		"react-native-img-cache": "^1.4.0",
		"react-native-navigation": "^1.1.79",
		"react-native-vector-icons": "^4.1.1"
	},
	"devDependencies": {
		"babel-eslint": "^7.2.3",
		"babel-jest": "20.0.3",
		"babel-preset-react-native": "1.9.2",
		"eslint": "^3.19.0",
		"eslint-config-airbnb": "^15.0.1",
		"eslint-plugin-import": "^2.3.0",
		"eslint-plugin-jsx-a11y": "^5.0.3",
		"eslint-plugin-react": "^7.0.1",
		"jest": "20.0.3",
		"react-test-renderer": "16.0.0-alpha.6"
	},
	"jest": {
		"preset": "react-native"
	}
}

How can the CLI team reproduce the problem?

Get my package.json and run npm install

supporting information:

  • npm -v prints: 5.0.1
  • node -v prints: v7.10.0
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: macOS
  • Network issues:
    No proxy or VPN or container

Gist

Here is the log gist

Edit:

yarn install in the same directory installs the packages

Activity

mnaumank

mnaumank commented on Jun 1, 2017

@mnaumank

In my case deleting package-lock.json and re issuing npm install fixed the problem. Is it possible 'package-lock.json' is machine specific?

zunman

zunman commented on Jun 6, 2017

@zunman

Hi. I have the same error since yesterday

remote:        Installing node modules (package.json)
remote:        npm ERR! code EINTEGRITY
remote:        npm ERR! sha1-XYgSgHo7OciRwREQnlCyGqwu20U= integrity checksum failed when using sha1: wanted sha1-XYgSgHo7OciRwREQnlCyGqwu20U= but got sha1-30sALaknJtfVWXHtnqsXGqSod0M=. (23778 bytes)

my package.json is

 {
  "name": "RealTimeInstagram",
  "version": "0.0.1",
  "description": "Real time instagram",
  "author": "Michael Lancaster",
  "dependencies": {
    "EventEmitter": "^1.0.0",
    "events": "^1.1.1",
    "express": "^3.21.2",
    "instagram-node-lib": "https://github.com/zunman/instagram-node-lib/tarball/master",
    "jade": "1.3.1",
    "request": "2.34.0",
    "socket.io": "^0.9.19",
    "store": "^2.0.4"
  },
  "engines": {
    "node": "6.9.1",
    "npm": "5.0.1"
  }
}

npm version 3.10.8
node version 6.9.1
Operating system: MacOS

This error started to appear for me when I I commented out a line in a local version of instagram-node-lib "https://github.com/zunman/instagram-node-lib/tarball/master". I reverted my changes but the error persists.

I deleted package-lock.json and that did not resolve the error either.

bohiltea

bohiltea commented on Jun 7, 2017

@bohiltea

Deleting npm and npm-cache folders in Users%username%\AppData\Roaming (windows 7) and running npm install fixed it for me

BurtHarris

BurtHarris commented on Jun 7, 2017

@BurtHarris

Not sure if it's the same thing, but I'm getting Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha1-7kVpawZ+S98Vw5VnEKTDbBfY+PA= integrity checksum failed when using sha1: wanted sha1-7kVpawZ+S98Vw5VnEKTDbBfY+PA= but got sha512-39w19Mseg83z68JsIdcuFH3Z+BR/Jc3gRBB4Pn/aUm76rdy0prMz5iIMJAOb0Bo6H/rZhQc41vFf3tAMgqufVQ==. (3203 bytes)

It seems like the following fixed it for me, warning me it shouldn't be necessary...

npm cache clean --force
akshayjadhav19710

akshayjadhav19710 commented on Jun 9, 2017

@akshayjadhav19710

Please update npm by cmd
' npm i -g npm '

flacohenao

flacohenao commented on Jun 11, 2017

@flacohenao

happens to me too, I even uninstall but the problem still happening

BurtHarris

BurtHarris commented on Jun 12, 2017

@BurtHarris

@flacohenao did you try clearing the cache w/ npm cache clean --force

flacohenao

flacohenao commented on Jun 12, 2017

@flacohenao

@BurtHarris I did, and still happening. I realize that it was just the "super" template made by Ionic using ionic start.

I started with other template and all worked just well..

thank you.

maxdelia

maxdelia commented on Jun 12, 2017

@maxdelia

Deleting package-lock.json solved the issue for me!

DullReferenceException

DullReferenceException commented on Jun 12, 2017

@DullReferenceException

I noticed this happened to me because of local changes made to an installed package; that probably caused the integrity value that was committed to be incorrect. Removing/reinstalling that package caused the corrected integrity value to be generated.

ilabacheuski

ilabacheuski commented on Jun 13, 2017

@ilabacheuski
npm ERR! code EINTEGRITY

Got it all the time.
I run nom cache clean --force deleted node_modules, package-lose.json. Still have it.
app is cloned from bitbucket, developed in Windows, then cloned and tried on macOS

64 remaining items

ilabacheuski

ilabacheuski commented on Nov 13, 2017

@ilabacheuski

@dylanpyle try to update npm to latest version in CI before running. My problem with material google fonts has been disappeared in the latest npm. And to solve npm i -g npm try to verify cache. Check out whether CI uses some caching technology for npm. That can cause a problem. npm cache verify as I suggested in the comment above.

Benzner

Benzner commented on Nov 22, 2017

@Benzner

I found same problem when run
'react-native init projectname'

`npm WARN deprecated connect@2.30.2: connect 2.x series is deprecated
npm ERR! code EINTEGRITY
npm ERR! sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav
4Wavh/lZdzzd3b2KxIXC5Q== integrity checksum failed when using sha512: wanted sha
512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd
3b2KxIXC5Q== but got sha512-gr+uDP+o1V+q1lQw6M4IsLwOk8XutOi1VWiA7186M4O1v3Brs19R
pweK4XDKlY4xAtFrtJ+QHnxIzUDFCqb/mQ==. (887 bytes)
npm WARN tar invalid entry

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users***\AppData\Roaming\npm-cache_logs\2017-11-22T02_57
_55_075Z-debug.log
{ Error: Command failed: npm install --save --save-exact react-native`

added a commit that references this issue on Nov 22, 2017
paulius005

paulius005 commented on Dec 1, 2017

@paulius005

We have been getting the same issue on our Travis builds ever since upgrading to Node 8 and including package-lock.json in our commits. npm 5.5.1

jmanueltl

jmanueltl commented on Feb 3, 2018

@jmanueltl

Sin duda que actualizar el npm desde cmd me ayudó.
En w / npm i -g npm
o tambien w/ npm cache verify

UmidjonZar

UmidjonZar commented on Feb 10, 2018

@UmidjonZar

npm install --save-dev --save-exact react-native-scripts , that worked for me

nitaliano

nitaliano commented on Mar 7, 2018

@nitaliano

This just happen to me out of nowhere with 5.0.3 running npm cache verify --force fixed the issue for me

zkat

zkat commented on Mar 7, 2018

@zkat
Contributor

@nitaliano you should really not be using 5.0.3. Please upgrade -- that version has a chunk of unpleasant known issues (as does the entire 5.0 series)

zkat

zkat commented on Mar 7, 2018

@zkat
Contributor

For others showing up here anyway: Please upgrade to 5.7.1 (or later, I guess), as there's been a bunch of fixes to prevent EINTEGRITY in recent versions. I'm gonna lock this thread, since people running old versions of npm reporting this is no longer a useful thing to have.

locked as resolved and limited conversation to collaborators on Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @zkat@vjpr@dylanpyle@mnzaki@skrivle

        Issue actions

          npm ERR! code EINTEGRITY (npm 5) · Issue #16861 · npm/npm