Skip to content

[Bug]: macOS Intel build crashes on launch due to missing @lydell/node-pty-darwin-x64 #2351

Description

@andrewdhannah

Summary

The latest OpenWork macOS app fails immediately on launch on an Intel Mac / darwin-x64 system.

The crash appears to be a packaging/dependency issue: the app includes @lydell/node-pty, but the required platform-specific optional dependency @lydell/node-pty-darwin-x64 is missing from the packaged app bundle.

A fresh install does not resolve the issue.

To Reproduce

  1. Download and install the latest OpenWork macOS release.
  2. Install it normally into /Applications.
  3. Launch OpenWork.app.
  4. The app fails immediately with an uncaught exception before reaching the normal UI.

Error shown:

Uncaught Exception:
Error: The @lydell/node-pty package supports your platform (darwin-x64), but it could not find the platform-specific package for it: @lydell/node-pty-darwin-x64

This can happen if you use the "--omit=optional" (or "--no-optional") npm flag.
The "optionalDependencies" package.json feature is used to install the correct
binary executable for your current platform. Remove that flag to use @lydell/node-pty.

This can also happen if the "node_modules" folder was copied between two operating systems
that need different binaries - including "virtual" operating systems like Docker and WSL.
If so, try installing with npm rather than copying "node_modules".
    at requirePlatformSpecificPackage (/Applications/OpenWork.app/Contents/Resources/app.asar/node_modules/node-pty/index.js:19:13)
    at Object.<anonymous> (/Applications/OpenWork.app/Contents/Resources/app.asar/node_modules/node-pty/index.js:47:18)
    at Module._compile (node:internal/modules/cjs/loader:1738:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1904:10)
    at Module.load (node:internal/modules/cjs/loader:1472:32)
    at Module._load (node:internal/modules/cjs/loader:1289:12)
    at c._load (node:electron/js2c/node_init:2:17950)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:242:24)
    at Module.require (node:internal/modules/cjs/loader:1494:12)

Expected behavior

OpenWork should launch normally after a fresh install of the macOS app.

Actual behavior

OpenWork Starts to load then displays the error listed above.

/Applications/OpenWork.app/Contents/Resources/app.asar/node_modules/node-pty/index.js

but the required platform package is missing:

@lydell/node-pty-darwin-x64

Screenshots (optional)

No response

OW version & Desktop info (optional)

  • OpenWork version: latest available release / update that was offered
  • OS: macOS on Intel Mac
  • Architecture: darwin-x64 / Intel
  • Install type: fresh install into /Applications

Additional context (optional)

This does not look like user configuration or stale local state, because it reproduces after a fresh install.

Likely cause:
The macOS Intel packaged artifact may have been built or pruned without optional dependencies, or the platform-specific optional dependency was excluded from app.asar.

Suggested release validation:

node -e "require('@lydell/node-pty'); console.log('node-pty ok')"

node_modules/@lydell/node-pty
node_modules/@lydell/node-pty-darwin-x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions