Skip to content

fix: keep Windows node-pty addons in the desktop package - #408

Merged
elkaix merged 2 commits into
mainfrom
fix/windows-node-pty-package
Nov 14, 2026
Merged

elkaix merged 2 commits into
mainfrom
fix/windows-node-pty-package

Conversation

@elkaix

@elkaix elkaix commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Requirement or Bug

The Windows desktop package step stops because pty.node is missing from the packaged Host.

Bug Reproduction Steps

Rerun the failed jobs on desktop release run 43546042628. The Windows job fails in afterPack with ENOENT for resources/host/node_modules/node-pty/prebuilds/win32-x64/pty.node.

Root Cause

pnpm deploy leaves node-pty native addons as links into the store. electron-builder recreates every link as a directory junction on Windows. A junction cannot be pty.node, so the file check in verify-packaged-runtime.ts fails. This is a fundamental fix of the copy, plus a restore at pack time if a link still gets through.

Code Changes

Staging now copies the Host node_modules with links expanded, then expands any link still under node-pty, and refuses to continue unless pty.node, conpty.node, and conpty_console_list.node are real files. The pack check copies those files from the staged tree when the packaged copy is missing or is still a link.

Behavior Changes and Affected Users

Behavior Before After Who relies on the old behavior Escape hatch
Windows desktop package contains node-pty win32-x64 addons The package step can stop with ENOENT for pty.node The addons are real files in the packaged Host Windows desktop build None

Affected module: apps/desktop staging and afterPack. Tests: stage-runtime.spec.ts, verify-packaged-runtime.spec.ts.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: issue must have a maintainer's /approve).
  • I have added tests for new behavior.
  • I have updated relevant documentation.
  • I have run pnpm typecheck locally and it passes.

pnpm deploy leaves pty.node as a store link. electron-builder turns
that link into a directory junction on Windows, so the packaged Host
has no pty.node and the package step stops.
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7871d4d and 644ce81.

Files selected for processing: 4

  • apps/desktop/scripts/stage-runtime.ts
  • apps/desktop/scripts/verify-packaged-runtime.ts
  • apps/desktop/tests/stage-runtime.spec.ts
  • apps/desktop/tests/verify-packaged-runtime.spec.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@pkg-pr-new

pkg-pr-new Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@pymodel/pythinker-code@644ce81
npx https://pkg.pr.new/@pymodel/pythinker-code@644ce81

commit: 644ce81

Linux and macOS package jobs do not download the win32 prebuilds, so
the staging check was failing those builds.
@elkaix
elkaix merged commit e406b44 into main Nov 14, 2026
25 checks passed
@elkaix
elkaix deleted the fix/windows-node-pty-package branch November 14, 2026 03:13
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.

1 participant