fix: guard dependency installs on unsupported Node versions - #1346
Conversation
|
Warning Review limit reached
More reviews will be available in 17 minutes and 53 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a Node.js version check script (script/check-node.mjs) during the postinstall phase to prevent dependency installation issues on Node 25+. It also adds a .node-version file and corresponding tests. The review feedback suggests making the version parser more robust by handling unparseable or custom Node version strings gracefully instead of throwing an unhandled exception, and adding a test case to verify this behavior.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Fix Electron's silent installation failure on Node 24.16.0+ and 26.x. Root cause: extract-zip -> yauzl@2.x -> fd-slicer@1.x has a broken stream lifecycle on newer Node versions, causing Electron's postinstall to silently skip binary extraction (path.txt and Frameworks missing, dist is a 244K stub). Fix: upgrade Electron from 40.8.0 to 40.10.3, which includes the upstream fix (electron/electron#51886) that replaces extract-zip with @electron-internal/extract-zip. Changes: - Upgrade electron 40.8.0 -> 40.10.3 in packages/desktop-electron - Remove yauzl override from root package.json (no longer needed) - Delete script/check-node.mjs and its test (Node 25+ guard removed) - Remove preinstall hook and test:install-guard from package.json - Remove install guard unit step from CI workflow - Add --assert-complete flag to repair-electron-install.mjs - Add install-matrix CI job covering Node 24 and 26 - Add pre-repair assertion in desktop-smoke workflow Verification: - bun install --frozen-lockfile: passes on Node 24 and 26 - install-matrix (24): SUCCESS - install-matrix (26): SUCCESS - desktop-smoke: SUCCESS - Local Node 26 fresh install: path.txt + Frameworks + 275M dist confirmed Related: electron/electron#51619, electron/electron#51886, #1329, #1346
Summary
Add a small install-time Node guard for PawWork dependency installs and pin the local recommended Node version with
.node-version.Why
Related to #1329.
New git worktrees can silently install an incomplete Electron 40.8.0 binary when
bun installruns trusted dependency postinstalls through local Node 26. The broken install leaves Electron'sdistas a small stub withoutpath.txtorElectron.app/Contents/Frameworks, and the failure only appears later asError: Electron uninstallwhenbun run devreacheselectron-vite dev.This PR makes the unsupported Node runtime fail loudly during install with a recovery command, instead of letting a bad Electron binary persist.
Related Issue
Fixes #1329.
Human Review Status
Pending
Review Focus
Please check that the guard is scoped tightly to dependency installs and that the recovery message is clear enough for both humans and coding agents.
Risk Notes
The guard blocks Node 25+ for root dependency installs through the root
preinstalllifecycle. CI already uses Node 24 for root installs, andsite/installs do not run the root install lifecycle. Developers on Node 25+ need to switch to Node 24 and reinstall dependencies.How To Verify
Screenshots or Recordings
Not applicable. This changes CLI/install output only; the terminal output was verified in the checks above.
Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.