build: sync server package-lock.json to fix npm ci in CI - #963
Open
Sarthak816 wants to merge 1 commit into
Open
Conversation
The lockfile declared an optional peer dependency on gcp-metadata@^7.0.1 (from mongodb@7.x nested under mongodb-memory-server-core and mongoose) but had no lock entry for a 7.x version, so npm ci failed with 'Missing: gcp-metadata@7.0.1 from lock file' on every backend CI run, regardless of the changes in the PR. Regenerating the lockfile adds the missing nested gcp-metadata@7.0.1 entries. Verified locally: npm ci succeeds and all 78 backend tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the recurring CI / Backend — tests failure that shows up on every PR:
npm cierrors withMissing: gcp-metadata@7.0.1 from lock file. It is unrelated to any PR's changes and happens on a clean checkout ofmain.Root cause
The lockfile's
mongodb@7.xentries (nested undermongodb-memory-server-coreandmongoose) declare an optional peer dependency ongcp-metadata@^7.0.1, but the lockfile had no entry for a 7.x version ofgcp-metadata(only 6.1.1 and 8.1.2 existed).npm cirefuses to run when a peer dependency listed in the lockfile has no matching lock entry.Fix
Run
npm installinserver/to regenerate the lockfile. The only change isserver/package-lock.json(+33 lines): the missing nestedgcp-metadata@7.0.1entries were added.package.jsonis untouched.Verification
npm cinow succeeds inserver/(previously failed with EUSAGE)jest, 3 suites)