Skip to content

chore(ci): disable phantomjs-prebuilt postinstall that breaks CI installs#597

Merged
styfle merged 1 commit into
mainfrom
fix/flaky-phantomjs-install
Jun 22, 2026
Merged

chore(ci): disable phantomjs-prebuilt postinstall that breaks CI installs#597
styfle merged 1 commit into
mainfrom
fix/flaky-phantomjs-install

Conversation

@styfle

@styfle styfle commented Jun 22, 2026

Copy link
Copy Markdown
Member

What

Disable the phantomjs-prebuilt postinstall build (pnpm allowBuilds: false) and drop the install-generated lib/location.js from the expected trace fixture.

Why

phantomjs-prebuilt is deprecated. Its postinstall downloads a 16MB binary from GitHub releases and extracts it to generate lib/location.js. The download succeeds, but the zip extraction consistently fails on macOS/Windows:

node_modules/phantomjs-prebuilt install: Received 16746K total.
node_modules/phantomjs-prebuilt install: Extracting zip contents
node_modules/phantomjs-prebuilt install: Install exited unexpectedly
 ELIFECYCLE  Command failed with exit code 1.

This fails pnpm install and breaks CI for any PR that touches dependencies (e.g. #596), and re-running doesn't help.

The test/unit/phantomjs-prebuilt fixture only exercises nft's special case that emits the bin/ directory — lib/location.js is just an install artifact, not part of the behavior under test. Skipping the build makes installs reliable on every OS while preserving the meaningful test coverage.

Verification

  • Removed lib/location.js locally and confirmed the phantomjs trace test passes against the updated fixture.
  • Full CI matrix is green, including the Node 24 macOS/Windows jobs that previously failed.

🤖 Generated with Claude Code

@styfle styfle requested review from a team, icyJoseph and ijjk as code owners June 22, 2026 14:16
phantomjs-prebuilt (deprecated) downloads and extracts a binary from
GitHub releases in its postinstall to generate lib/location.js. The
extraction consistently fails on macOS/Windows ("Install exited
unexpectedly"), breaking `pnpm install` and CI regardless of the change
under test. Retrying does not help.

The nft trace test only relies on the phantomjs-prebuilt special case
emitting the bin/ directory; lib/location.js is just an install-time
artifact. Disable the postinstall build (pnpm allowBuilds) so installs
are reliable on every OS, and drop lib/location.js from the expected
trace output accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@styfle styfle force-pushed the fix/flaky-phantomjs-install branch from 391450f to 6d9d021 Compare June 22, 2026 14:48
@styfle styfle changed the title fix: retry pnpm install to ride out flaky phantomjs-prebuilt postinstall fix: skip deprecated phantomjs-prebuilt postinstall to stabilize CI Jun 22, 2026
@styfle styfle changed the title fix: skip deprecated phantomjs-prebuilt postinstall to stabilize CI fix: disable phantomjs-prebuilt postinstall that breaks CI installs Jun 22, 2026
@styfle styfle changed the title fix: disable phantomjs-prebuilt postinstall that breaks CI installs chore(ci): disable phantomjs-prebuilt postinstall that breaks CI installs Jun 22, 2026
@styfle styfle merged commit 4e32836 into main Jun 22, 2026
17 checks passed
@styfle styfle deleted the fix/flaky-phantomjs-install branch June 22, 2026 15:10
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