Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rush install error: failing integrity checks #528

Closed
gscottolson opened this issue Feb 15, 2018 · 4 comments
Closed

rush install error: failing integrity checks #528

gscottolson opened this issue Feb 15, 2018 · 4 comments
Labels
help wanted If you're looking to contribute, this issue is a good place to start!

Comments

@gscottolson
Copy link

When I run rush install or rush install -c or rush install --full-clean, the install process fails due to integrity checks. It seems like the sha512 for any rush.json project does not match the expected sha value. If I add an additional project, the number of integrity check failures increases by one. The errant sha is related to the @rush-temp/<packageName>.

I can install the relevant node_modules by running rush generate or rush generate --force. However, rush installing after this step still fails.

Am I .gitignore-ing an expected file or directory in a package? I don’t know how a sha relates to a directory structure so I am having trouble debugging the issue.

Here is the stack trace for one integrity check error:

Unhandled rejection Error: Integrity check failed:
  Wanted: sha512-31FsQe41cQxblj3wO2s6BfrK3B174aZpOiJcyRn9Ef+czMiHc0I49UJL4i/c4Jq4eaDdr3lFEUlzb+aFjC2feQ==
   Found: sha512-Ip1aeME35ykr1XECivinXWXMaMXMkstN/KkY0iHBgweGmdynq94zHTTIUc+bIgqKViun0o3oFmb7oqwM5icYfg==
    at checksumError (/Users/gscott/.rush/npm-5.6.0/node_modules/npm/node_modules/cacache/lib/content/write.js:155:13)
    at write (/Users/gscott/.rush/npm-5.6.0/node_modules/npm/node_modules/cacache/lib/content/write.js:33:22)
    at putData (/Users/gscott/.rush/npm-5.6.0/node_modules/npm/node_modules/cacache/put.js:11:10)
    at Object.x.put (/Users/gscott/.rush/npm-5.6.0/node_modules/npm/node_modules/cacache/locales/en.js:28:37)
    at readFileAsync.then.data (/Users/gscott/.rush/npm-5.6.0/node_modules/npm/node_modules/pacote/lib/fetchers/file.js:38:28)
    at tryCatcher (/Users/gscott/.rush/npm-5.6.0/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/gscott/.rush/npm-5.6.0/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/gscott/.rush/npm-5.6.0/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/gscott/.rush/npm-5.6.0/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/gscott/.rush/npm-5.6.0/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
    at Promise._fulfill (/Users/gscott/.rush/npm-5.6.0/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
    at /Users/gscott/.rush/npm-5.6.0/node_modules/npm/node_modules/bluebird/js/release/nodeback.js:42:21
    at /Users/gscott/.rush/npm-5.6.0/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
@octogonz
Copy link
Collaborator

octogonz commented Feb 15, 2018

This sounds like the request race condition (see request/request#2807). Seems like NPM will never fix it.

We solved it by moving to PNPM, which is way faster than NPM, and is much more reliable.

@nickpape nickpape added the help wanted If you're looking to contribute, this issue is a good place to start! label Feb 15, 2018
@gscottolson
Copy link
Author

Ultimately, pnpm solved this for me. I had to do a bit more plumbing to pull all my packages down from my VSTS package feed.

Thanks for the help and for the great work on Rush.

@octogonz
Copy link
Collaborator

octogonz commented Mar 7, 2018

Awesome! :-)

@petejodo
Copy link

I feel like I'm running into this issue with yarn as well. To give full context, we have a separate branch as we get rush setup from lerna to rush and so I switched from that branch to the rush one removed the lingering top level node_modules and ran rush update and seeing these integrity checks. It's probably not this but something else. Previous times I ran into it, it had to do with not using the correct version of node but I made sure it was correct. Confirmed yarn version matched the expected one as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted If you're looking to contribute, this issue is a good place to start!
Projects
None yet
Development

No branches or pull requests

4 participants