Skip to content

Commit 6469a3f

Browse files
authored
Merge pull request #46 from dstyka2/main
2 parents e6d3446 + 602d05c commit 6469a3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
When changing the dependencies of the project (the contents of `package.json` or `package-lock.json`), some care must be taken.
22
After changing the dependencies in `package.json`:
3-
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). ¯\_(ツ)_
3+
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). ¯\\_(ツ)_
44
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.

0 commit comments

Comments
 (0)