Skip to content

fix(firestore-counter): repair package-lock for builder npm#2907

Merged
cabljac merged 1 commit into
nextfrom
fix/firestore-counter-package-lock-builder
Jul 2, 2026
Merged

fix(firestore-counter): repair package-lock for builder npm#2907
cabljac merged 1 commit into
nextfrom
fix/firestore-counter-package-lock-builder

Conversation

@cabljac

@cabljac cabljac commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Problem

CI on next fails uploading firestore-counter@0.2.17-rc.0:

npm ERR! `npm ci` can only install packages when your package.json and package-lock.json ... are in sync
npm ERR! Missing: ts-node@10.9.2 from lock file

Root cause

The extensions builder falls back to npm 9 (its nvm install 22 fails: "version v22 is not yet installed"). npm 9's npm ci auto-resolves jest-config's optional peer ts-node: >=9.0.0 to ts-node@10.9.2 and demands that subtree in the lock. The lock (last regenerated with a newer npm) only carried the direct ts-node@7.0.1 and lacked the 10.9.2 tree.

Reproduced locally: npm@9 ci fails with the identical error; npm@11 ci passes, which is why it slipped through.

Fix

  • package.json: remove unused ts-node@^7.0.1. The ts-jest preset does not use it; sibling extensions (firestore-send-email, storage-resize-images) run the same preset with no ts-node.
  • package-lock.json: surgically regenerated from the committed lock (npm@9 install --package-lock-only). Only the ts-node subtree changed; @types/node@22.19.17 and all other pins are untouched. A from-scratch regen was avoided because it floats @types/node and breaks tsc@4.9.

Validation

  • npm ci exit 0 under both npm 9 (builder) and npm 11
  • npm ci -> build (tsc) exit 0
  • unit tests: 14 pass (only controller.emulator.test.ts fails, which needs a running Firestore emulator)

Drop unused ts-node@^7 devDep and regenerate lock so npm ci resolves
jest-config's optional ts-node peer against the lock. The prior lock was
generated with a newer npm than the extensions builder runs (npm 9),
which demanded a ts-node@10.9.2 subtree absent from the lock.
@cabljac cabljac requested a review from a team as a code owner July 2, 2026 08:07
@cabljac cabljac merged commit 0bec3d5 into next Jul 2, 2026
17 checks passed
@cabljac cabljac deleted the fix/firestore-counter-package-lock-builder branch July 2, 2026 08:08

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes ts-node from the development dependencies in package.json and updates the package-lock.json file accordingly. There are no review comments to assess, and I have no additional feedback to provide.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant