Skip to content

fix(ci): remove compare-npm to fix bundle-stats timeout#849

Closed
binoy14 wants to merge 1 commit intomainfrom
cursor/bundle-stats-failure-9807
Closed

fix(ci): remove compare-npm to fix bundle-stats timeout#849
binoy14 wants to merge 1 commit intomainfrom
cursor/bundle-stats-failure-9807

Conversation

@binoy14
Copy link
Copy Markdown
Contributor

@binoy14 binoy14 commented Mar 30, 2026

Problem

The bundle-stats CI check has been failing on the last 3 PRs (#846, #847, #848) with:

Error: Failed to install @sanity/cli@6.3.0 from npm: spawnSync npm ETIMEDOUT

Root Cause

The compare-npm: latest option in the bundle-stats workflow tells the rexxars/bundle-stats action to install the latest published version of @sanity/cli from npm into a temp directory using npm install. The action has a hardcoded 120-second timeout for this install.

Since the v6.3.0 release, @sanity/cli and its dependency tree are large enough that npm install cannot complete within 120 seconds on GitHub Actions runners, causing every PR's bundle-stats check to fail.

Earlier PRs (#841, #842) passed because they ran before v6.3.0 was published to npm (or hit a cached/smaller version).

Fix

  • Remove compare-npm: latest — the base-branch comparison (PR head vs. merge base) is the primary and more useful comparison. The npm comparison was a nice-to-have supplement.
  • Bump rexxars/bundle-stats from v1.11.0 to v1.11.1 — picks up a fix for import timing output (write import timing to temp file instead of stdout).
Open in Web Open in Cursor 

The compare-npm: latest option was causing bundle-stats to fail on all
PRs since the v6.3.0 release. The action tries to npm install
@sanity/cli@6.3.0 into a temp directory with a 120-second timeout,
which is insufficient for the package's dependency tree.

The base-branch comparison (head vs base) remains and is the more
useful comparison. Also bumps the action from v1.11.0 to v1.11.1.

Co-authored-by: Binoy Patel <binoy14@users.noreply.github.com>
@claude
Copy link
Copy Markdown

claude Bot commented Mar 30, 2026

Claude finished @binoy14's task in 13s —— View job


No issues found. The change is minimal and correct — removing compare-npm: latest eliminates the root cause of the timeout, and the version bump to v1.11.1 is a straightforward patch update.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 30, 2026

📦 Bundle Stats — @sanity/cli

Compared against main (6c351ae1)

@sanity/cli

Metric Value vs main (6c351ae)
Internal (raw) 2.1 KB -
Internal (gzip) 799 B -
Bundled (raw) 11.06 MB -
Bundled (gzip) 2.07 MB -
Import time 825ms -2ms, -0.2%

bin:sanity

Metric Value vs main (6c351ae)
Internal (raw) 975 B -
Internal (gzip) 460 B -
Bundled (raw) 9.83 MB -
Bundled (gzip) 1.77 MB -
Import time 1.92s +7ms, +0.4%

🗺️ View treemap · Artifacts

Details
  • Import time regressions over 10% are flagged with ⚠️
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

📦 Bundle Stats — @sanity/cli-core

Compared against main (6c351ae1)

Metric Value vs main (6c351ae)
Internal (raw) 92.2 KB -
Internal (gzip) 21.6 KB -
Bundled (raw) 21.64 MB -
Bundled (gzip) 3.43 MB -
Import time 774ms -4ms, -0.5%

🗺️ View treemap · Artifacts

Details
  • Import time regressions over 10% are flagged with ⚠️
  • Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.

@binoy14 binoy14 closed this Mar 31, 2026
@binoy14 binoy14 deleted the cursor/bundle-stats-failure-9807 branch March 31, 2026 16:42
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.

2 participants