Skip to content

Instantly share code, notes, and snippets.

@kreig303
Last active January 1, 2023 10:24
Show Gist options
  • Save kreig303/88fb089fc80e1cade3dd629e54d6704b to your computer and use it in GitHub Desktop.
Save kreig303/88fb089fc80e1cade3dd629e54d6704b to your computer and use it in GitHub Desktop.
stop lockfile sha-swapping! [npm]

hocus pocus to stop “sha-swapping” in lockfiles below

% git checkout branch-you-working-on
% rm -rf node_modules
% npm cache clean -f
% npm i

this should stop that sha1 <-> sha512 crap from happening to your local lockfiles when you do a random npm i after pulling/rebasing a branch.

or, you could just do an npm ci assuming you're not installing modules yourself.

ymmv! etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment