Skip to content

fix: sync package-lock.json to unblock Vercel npm ci deploys - #421

Merged
hongyi-chen merged 1 commit into
mainfrom
fix/vercel-lockfile-sync
Jul 29, 2026
Merged

fix: sync package-lock.json to unblock Vercel npm ci deploys#421
hongyi-chen merged 1 commit into
mainfrom
fix/vercel-lockfile-sync

Conversation

@hongyi-chen

Copy link
Copy Markdown
Collaborator

Problem

Production deployments on Vercel for the docs repo were erroring out.

Root cause

Vercel installs dependencies with npm ci (installCommand in vercel.json). npm ci requires package.json and package-lock.json to be fully in sync and fails hard otherwise. The lockfile committed in #413 (the brace-expansion CVE bump) was missing several optional transitive dependencies, so npm ci failed with EUSAGE at the install step — before the build ever ran:

npm error `npm ci` can only install packages when your package.json and
package-lock.json or npm-shrinkwrap.json are in sync.
npm error Missing: @emnapi/runtime@1.11.1 from lock file
npm error Missing: @emnapi/core@1.11.3 from lock file
npm error Missing: @emnapi/wasi-threads@1.2.3 from lock file

This was easy to miss locally because astro build on its own uses a loose npm install, which silently repairs the lockfile. The strict npm ci Vercel uses does not.

Fix

Regenerated package-lock.json with npm install so it is in sync with package.json again. Only the lockfile changes.

Verification

  • npm ci — now exits 0 (previously failed with EUSAGE).
  • npm run build — succeeds, 352 pages built, .vercel/output produced.

Note (not blocking)

vercel.json currently has 1,976 redirects. Vercel's route limit is 2,048, so this is under the cap for now but worth keeping an eye on as redirects are added — the repo convention puts every redirect in vercel.json.

Conversation: https://staging.warp.dev/conversation/8d303aee-c883-4f1a-a25c-dbca722787f8

Run: https://oz.staging.warp.dev/runs/019faf3e-8107-757b-ae33-89846d9abd23

This PR was generated with Oz.

Vercel installs with `npm ci` (see vercel.json installCommand), which
requires package.json and package-lock.json to be fully in sync. The
lockfile committed in #413 (brace-expansion CVE bump) was missing several
optional transitive deps (@emnapi/core, @emnapi/runtime,
@emnapi/wasi-threads), so `npm ci` failed with EUSAGE before the build
could run, erroring out every production deployment.

Regenerated the lockfile with `npm install` so it is in sync again.
Verified `npm ci` and `npm run build` both succeed.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Jul 29, 2026
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 29, 2026 7:08pm

Request Review

@hongyi-chen
hongyi-chen marked this pull request as ready for review July 29, 2026 19:38
@hongyi-chen
hongyi-chen enabled auto-merge (squash) July 29, 2026 19:38
@oz-for-oss

oz-for-oss Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@hongyi-chen

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss 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.

Overview

This PR refreshes package-lock.json so it is consistent with package.json for Vercel's npm ci install path, adding the missing optional @emnapi transitive entries and updating lockfile peer metadata.

Concerns

  • No blocking correctness, security, or spec-alignment concerns found in the annotated diff. spec_context.md reports no approved or repository spec context for this PR.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@hongyi-chen
hongyi-chen merged commit 13400dd into main Jul 29, 2026
8 checks passed
@hongyi-chen
hongyi-chen deleted the fix/vercel-lockfile-sync branch July 29, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants