Regenerate tutor-finder package-lock.json so npm ci works - #253
Conversation
npm ci fails on main for this recipe: npm error `npm ci` can only install packages when your package.json and npm error package-lock.json or npm-shrinkwrap.json are in sync. npm error Missing: @radix-ui/react-label@2.1.15 from lock file npm error Missing: @radix-ui/react-separator@1.1.15 from lock file npm error Missing: @radix-ui/react-toggle@1.1.18 from lock file npm error Missing: @radix-ui/react-tooltip@1.2.16 from lock file Four declared dependencies were added without regenerating the lock. npm install papers over it by re-resolving, which is presumably why it went unnoticed, but npm ci refuses outright -- so the reproducible install path is broken, the committed lock does not describe the tree you actually get, and OSV-Scanner cannot see into those four subtrees or their transitives. Regenerated with npm install --package-lock-only. No package.json change, no source change: 48 package entries added, all of them the four dependencies plus their transitive closure. After this the lock resolves every declared dependency, its root entry matches package.json, and re-running the regeneration is a no-op, so the lock is stable rather than merely closer. Fixes tinyfish-io#251.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Follow-up: verified end to end with a clean install rather than just the sync check. cd tutor-finder && rm -rf node_modules && npm ci
# exit 0Before this change the same command fails immediately with |
Fixes #251.
The bug
npm cifails intutor-finderon currentmain:Four declared dependencies were added without regenerating the lock.
npm installpapers over it by re-resolving, which is presumably why it went unnoticed — but that's also the problem:npm ci, hits a hard failure rather than a warning.The fix
npm install --package-lock-only. Nopackage.jsonchange, no source change — the entire diff is the lockfile: 48 package entries added, all four dependencies plus their transitive closure (mostly@radix-ui/*internals and@floating-ui/*).Yes, it's a big diff. That's the expected shape for a lock regeneration, and it's exactly why I kept it out of #250 rather than burying a lint repair under 800 lines of lockfile.
Verification
cd tutor-finder npm install --package-lock-onlyThree checks, since a lock can be closer without being correct:
package.jsonnow resolves to an entry in the lock tree (previously 4 were absent).dependencies/devDependenciesmatchpackage.jsonexactly.Scope
I checked the other five recipes from #248 —
restaurant-comparison-tool,scholarship-finder,summer-school-finder,tenders-finderandstay-scout-hubare all in sync.tutor-finderwas the only one affected among those.I have not audited the remaining ~28 recipes, so there may be more of these. Happy to run that sweep and report if it's useful — it's mechanical, and probably worth knowing given the OSV-Scanner angle.
Independent of #249 and #250; touches only this one file.