Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
When changing the dependencies of the project (the contents of `package.json` or `package-lock.json`), some care must be taken.
After changing the dependencies in `package.json`:
1. Run `rm -r node_modules/ && npm install` to correctly update `package-lock.json`. I don't fully understand why this is necessary, but it appears to be a workaround for an npm bug when developing on an architecture different from the deployment architecture. The workaround is described [here in the github issue for the bug](https://github.com/npm/cli/issues/4828#issuecomment-1145683953). We appear to only have become vulnerable to this bug when I added `sharp` as a dependency, and the issue is also referenced [here on sharp's website](https://sharp.pixelplumbing.com/install/#npm-v10). ¯\_(ツ)_/¯
1. Run `rm -r node_modules/ && npm install` to correctly update `package-lock.json`. I don't fully understand why this is necessary, but it appears to be a workaround for an npm bug when developing on an architecture different from the deployment architecture. The workaround is described [here in the github issue for the bug](https://github.com/npm/cli/issues/4828#issuecomment-1145683953). We appear to only have become vulnerable to this bug when I added `sharp` as a dependency, and the issue is also referenced [here on sharp's website](https://sharp.pixelplumbing.com/install/#npm-v10). ¯\\_(ツ)_/¯
2. Update the `npmDepsHash` field in `nix/system.nix` to match the new contents of `package-lock.json`. Specifically, run `prefetch-npm-deps package-lock.json` from the project root to get the new value to put in that file. [`prefetch-npm-deps`](https://search.nixos.org/packages?show=prefetch-npm-deps) is a nix package that pulls down all the dependencies of an npm project and computes a hash of their contents. If you don't have nix installed on your development machine, you can ssh into acmclock and run this program there.