Skip to content

build: sync server package-lock.json to fix npm ci in CI - #963

Open
Sarthak816 wants to merge 1 commit into
parthbuilds-community:mainfrom
Sarthak816:fix/server-lockfile-sync
Open

build: sync server package-lock.json to fix npm ci in CI#963
Sarthak816 wants to merge 1 commit into
parthbuilds-community:mainfrom
Sarthak816:fix/server-lockfile-sync

Conversation

@Sarthak816

Copy link
Copy Markdown
Contributor

Summary

Fixes the recurring CI / Backend — tests failure that shows up on every PR: npm ci errors with Missing: gcp-metadata@7.0.1 from lock file. It is unrelated to any PR's changes and happens on a clean checkout of main.

Root cause

The lockfile's mongodb@7.x entries (nested under mongodb-memory-server-core and mongoose) declare an optional peer dependency on gcp-metadata@^7.0.1, but the lockfile had no entry for a 7.x version of gcp-metadata (only 6.1.1 and 8.1.2 existed). npm ci refuses to run when a peer dependency listed in the lockfile has no matching lock entry.

Fix

Run npm install in server/ to regenerate the lockfile. The only change is server/package-lock.json (+33 lines): the missing nested gcp-metadata@7.0.1 entries were added. package.json is untouched.

Verification

  • npm ci now succeeds in server/ (previously failed with EUSAGE)
  • All 78 backend tests pass (jest, 3 suites)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant