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

Fix npm install that fails due to wrong checksum in package-lock. #400

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

arscan
Copy link
Contributor

@arscan arscan commented Oct 20, 2023

Summary

We were getting CI test failures on #375 after merging main back into that branch on the npm i step regarding an invalid checksum on a downloaded npm package. I investigated to make sure nobody was tampering with npm packages (that would be very bad) somehow. Go to main and run npm i and you'll get:

npm ERR! code EINTEGRITY
npm ERR! sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== integrity checksum failed when using sha512: wanted sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== but got sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==. (26872 bytes)

Turns out we've had an issue in the main branch since #369 where the semver dependency wasn't properly updated somehow to include the right checksum for integrity checks.

Screenshot 2023-10-20 at 3 39 16 PM

I verified that the checksum in there is for v6.3.0, even though we are now on v7.5.3.

I do not know why this wasn't picked up earlier by GitHub's build step on PRs. Though @360dgries had noticed it in July, but at the time others couldn't replicate it and I think we may have chalked it up to his unique Windows setup?

Testing Guidance

Prior to this, npm i will cause an ERR. After this, npm i will not.

@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bf3dc1f) 77.00% compared to head (fd24139) 77.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #400   +/-   ##
=======================================
  Coverage   77.00%   77.00%           
=======================================
  Files         214      214           
  Lines       10708    10708           
  Branches      991      991           
=======================================
  Hits         8246     8246           
  Misses       1884     1884           
  Partials      578      578           
Flag Coverage Δ
backend 94.35% <ø> (ø)
frontend 69.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@AlyssaWang AlyssaWang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like npm i runs as expected.

@arscan arscan merged commit 604b6e7 into main Oct 24, 2023
10 checks passed
@arscan arscan deleted the fix-npm-i branch October 24, 2023 17:04
@rpassas rpassas mentioned this pull request Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants