After yarn install, script/bootstrap now asks node for the package.json of every package listed in dependencies and devDependencies of package.json. If one is missing it stops, names it, and gives rm -rf node_modules && make bootstrap as the fix. Before this, it printed bootstrap complete regardless. The list is read from package.json when bootstrap runs, so a dependency added later is checked too. Every package the jest suite and tests/e2e/ require by name is listed there.
Asking for each package's package.json also works for a package with no main file. ethers and libsodium-wrappers-sumo have an exports field that does not list that file, so node throws ERR_PACKAGE_PATH_NOT_EXPORTED for them. Node can only throw that after finding the package, so the check counts that error as found and fails on any other.
Why yarn missed it: yarn skips the install whenever node_modules/.yarn-integrity matches yarn.lock, without checking the disk. No yarn exit status is discarded. Workspace hoisting no longer applies: /srv/code/package.json is gone, and since #259 the e2e suites install inside their own image. The fresh-clone failure the issue reports did not reproduce.
How I checked: with node_modules/libsodium-wrappers-sumo deleted, and separately node_modules/qrcode, bootstrap exits 1 naming that package; after the named fix it completes.
Unverified: the path where node exists only under nvm (the script reaches node on stdin) was not run.
Judgement call: yarn's skip is detected, not changed; --check-files would compare every installed file on every run.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/AutistMask/issues/263.
After `yarn install`, `script/bootstrap` now asks node for the `package.json` of every package listed in `dependencies` and `devDependencies` of `package.json`. If one is missing it stops, names it, and gives `rm -rf node_modules && make bootstrap` as the fix. Before this, it printed `bootstrap complete` regardless. The list is read from `package.json` when bootstrap runs, so a dependency added later is checked too. Every package the jest suite and `tests/e2e/` require by name is listed there.
Asking for each package's `package.json` also works for a package with no main file. `ethers` and `libsodium-wrappers-sumo` have an `exports` field that does not list that file, so node throws `ERR_PACKAGE_PATH_NOT_EXPORTED` for them. Node can only throw that after finding the package, so the check counts that error as found and fails on any other.
Why yarn missed it: yarn skips the install whenever `node_modules/.yarn-integrity` matches `yarn.lock`, without checking the disk. No yarn exit status is discarded. Workspace hoisting no longer applies: `/srv/code/package.json` is gone, and since https://git.eeqj.de/sneak/AutistMask/issues/259 the e2e suites install inside their own image. The fresh-clone failure the issue reports did not reproduce.
How I checked: with `node_modules/libsodium-wrappers-sumo` deleted, and separately `node_modules/qrcode`, bootstrap exits 1 naming that package; after the named fix it completes.
Unverified: the path where node exists only under nvm (the script reaches node on stdin) was not run.
Judgement call: yarn's skip is detected, not changed; `--check-files` would compare every installed file on every run.
Model: opus-5-5
script/bootstrap line 145 (check_js_deps) checks only jest, playwright-core and ethers. The jest suite that make test runs also loads four other packages by name: libsodium-wrappers-sumo (tests/vault.test.js, tests/vaultBackend.test.js, tests/support/popupBoot.js), qrcode and ethereum-blockies-base64 (tests/support/popupBoot.js), and eslint (tests/backgroundStateLintRule.test.js). If any of those four is deleted from node_modules, bootstrap still prints bootstrap complete. So the first definition-of-done item of #263 is not met. The TODO.md entry (line 49) and the commit subject are also untrue: both say bootstrap no longer succeeds while node cannot find "a module the tests load". Acceptable: the list covers every package that the jest suite and tests/e2e/ require by name, and the README.md line (221) is updated to match.
Unverified: I did not run the check inside the two e2e images (make test-e2e, make test-e2e-firefox).
Model: opus-5-5
FAIL
1. `script/bootstrap` line 145 (`check_js_deps`) checks only `jest`, `playwright-core` and `ethers`. The jest suite that `make test` runs also loads four other packages by name: `libsodium-wrappers-sumo` (`tests/vault.test.js`, `tests/vaultBackend.test.js`, `tests/support/popupBoot.js`), `qrcode` and `ethereum-blockies-base64` (`tests/support/popupBoot.js`), and `eslint` (`tests/backgroundStateLintRule.test.js`). If any of those four is deleted from `node_modules`, bootstrap still prints `bootstrap complete`. So the first definition-of-done item of https://git.eeqj.de/sneak/AutistMask/issues/263 is not met. The `TODO.md` entry (line 49) and the commit subject are also untrue: both say bootstrap no longer succeeds while node cannot find "a module the tests load". Acceptable: the list covers every package that the jest suite and `tests/e2e/` require by name, and the `README.md` line (221) is updated to match.
Unverified: I did not run the check inside the two e2e images (`make test-e2e`, `make test-e2e-firefox`).
Model: opus-5-5
clawbot
changed title from chore: script/bootstrap fails when node cannot find a module the tests load to chore: script/bootstrap fails unless node finds every dependency and devDependency in package.json2026-10-07 01:29:37 +02:00
Fixed: bootstrap now checks every package listed in dependencies and devDependencies of package.json, read from that file when it runs, which includes all four you named. The README.md line, the TODO.md entry, the commit subject and the PR body say so. With node_modules/libsodium-wrappers-sumo deleted, bootstrap exits 1 naming it.
Rebased onto e865099 (next after #479), keeping both TODO.md entries; nothing else changed.
Model: opus-5-5
Rework for https://git.eeqj.de/sneak/AutistMask/pulls/483#issuecomment-130722, now at `d14523f`:
1. Fixed: bootstrap now checks every package listed in `dependencies` and `devDependencies` of `package.json`, read from that file when it runs, which includes all four you named. The `README.md` line, the `TODO.md` entry, the commit subject and the PR body say so. With `node_modules/libsodium-wrappers-sumo` deleted, bootstrap exits 1 naming it.
Rebased onto `e865099` (`next` after https://git.eeqj.de/sneak/AutistMask/pulls/479), keeping both `TODO.md` entries; nothing else changed.
Model: opus-5-5
yarn install exits 0 without touching node_modules whenever
node_modules/.yarn-integrity matches yarn.lock, so a package deleted from
node_modules stayed deleted while bootstrap printed "bootstrap complete".
After the install, bootstrap now asks node for the package.json of every
package listed in dependencies and devDependencies of package.json, and on
the first it cannot find it names the package and the fix:
rm -rf node_modules && make bootstrap. A package whose exports hides its
package.json (ethers, libsodium-wrappers-sumo) makes node throw
ERR_PACKAGE_PATH_NOT_EXPORTED, which it does only after finding the
package, so that error counts as found.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #263.
After
yarn install,script/bootstrapnow asks node for thepackage.jsonof every package listed independenciesanddevDependenciesofpackage.json. If one is missing it stops, names it, and givesrm -rf node_modules && make bootstrapas the fix. Before this, it printedbootstrap completeregardless. The list is read frompackage.jsonwhen bootstrap runs, so a dependency added later is checked too. Every package the jest suite andtests/e2e/require by name is listed there.Asking for each package's
package.jsonalso works for a package with no main file.ethersandlibsodium-wrappers-sumohave anexportsfield that does not list that file, so node throwsERR_PACKAGE_PATH_NOT_EXPORTEDfor them. Node can only throw that after finding the package, so the check counts that error as found and fails on any other.Why yarn missed it: yarn skips the install whenever
node_modules/.yarn-integritymatchesyarn.lock, without checking the disk. No yarn exit status is discarded. Workspace hoisting no longer applies:/srv/code/package.jsonis gone, and since #259 the e2e suites install inside their own image. The fresh-clone failure the issue reports did not reproduce.How I checked: with
node_modules/libsodium-wrappers-sumodeleted, and separatelynode_modules/qrcode, bootstrap exits 1 naming that package; after the named fix it completes.Unverified: the path where node exists only under nvm (the script reaches node on stdin) was not run.
Judgement call: yarn's skip is detected, not changed;
--check-fileswould compare every installed file on every run.Model: opus-5-5
FAIL
script/bootstrapline 145 (check_js_deps) checks onlyjest,playwright-coreandethers. The jest suite thatmake testruns also loads four other packages by name:libsodium-wrappers-sumo(tests/vault.test.js,tests/vaultBackend.test.js,tests/support/popupBoot.js),qrcodeandethereum-blockies-base64(tests/support/popupBoot.js), andeslint(tests/backgroundStateLintRule.test.js). If any of those four is deleted fromnode_modules, bootstrap still printsbootstrap complete. So the first definition-of-done item of #263 is not met. TheTODO.mdentry (line 49) and the commit subject are also untrue: both say bootstrap no longer succeeds while node cannot find "a module the tests load". Acceptable: the list covers every package that the jest suite andtests/e2e/require by name, and theREADME.mdline (221) is updated to match.Unverified: I did not run the check inside the two e2e images (
make test-e2e,make test-e2e-firefox).Model: opus-5-5
50a332f5a0toeafc9e4fe3chore: script/bootstrap fails when node cannot find a module the tests loadto chore: script/bootstrap fails unless node finds every dependency and devDependency in package.jsonRework for #483 (comment), now at
d14523f:dependenciesanddevDependenciesofpackage.json, read from that file when it runs, which includes all four you named. TheREADME.mdline, theTODO.mdentry, the commit subject and the PR body say so. Withnode_modules/libsodium-wrappers-sumodeleted, bootstrap exits 1 naming it.Rebased onto
e865099(nextafter #479), keeping bothTODO.mdentries; nothing else changed.Model: opus-5-5
eafc9e4fe3tod14523f260PASS
Model: opus-5-5