stablyai/orca · error · Error
node-pty has no ConPTY runtime payload for win10-${rebuildAr
Error message
node-pty has no ConPTY runtime payload for win10-${rebuildArch} What it means
Thrown by the ConPTY-restore step in config/scripts/rebuild-native-deps.mjs on Windows when @electron/rebuild has rebuilt node-pty's conpty.node but no `third_party/conpty/<conptyVersion>/win10-<arch>` payload directory exists for the requested rebuildArch. @electron/rebuild bypasses node-pty's postinstall (which normally copies the ConPTY DLLs), so this script restores them — and it refuses to proceed if the source payload for that architecture is absent.
Source
Thrown at config/scripts/rebuild-native-deps.mjs:183
process.exit(1)
}
function restoreNodePtyWindowsConptyRuntime() {
if (rebuildPlatform !== 'win32' || !onlyModules.includes('node-pty')) {
return
}
const nodePtyDir = resolve(projectDir, 'node_modules', 'node-pty')
if (!existsSync(join(nodePtyDir, 'build', 'Release', 'conpty.node'))) {
return
}
const conptyRoot = join(nodePtyDir, 'third_party', 'conpty')
const sourceDir = readdirSync(conptyRoot, { withFileTypes: true })
.filter((entry) => entry.isDirectory())
.map((entry) => join(conptyRoot, entry.name, `win10-${rebuildArch}`))
.find((candidate) => existsSync(candidate))
if (!sourceDir) {
throw new Error(`node-pty has no ConPTY runtime payload for win10-${rebuildArch}`)
}
const runtimeDir = join(nodePtyDir, 'build', 'Release', 'conpty')
mkdirSync(runtimeDir, { recursive: true })
for (const filename of NODE_PTY_CONPTY_RUNTIME_FILES) {
const sourceFile = join(sourceDir, filename)
if (!existsSync(sourceFile)) {
throw new Error(`node-pty is missing ${sourceFile}`)
}
copyFileSync(sourceFile, join(runtimeDir, filename))
}
// Why: @electron/rebuild bypasses node-pty's postinstall step that normally copies these DLLs.
console.log(`[rebuild] Restored node-pty ConPTY runtime files for win10-${rebuildArch}.`)
}
function ensureElectronPackageInstalled() {
if (electronPackageIsUsable()) {
returnView on GitHub (pinned to 1136503c6a)
Solutions
- Reinstall node-pty cleanly (`rm -rf node_modules/node-pty && npm install`) so the full third_party/conpty payload is restored for your arch.
- Ensure `--arch` matches an arch node-pty actually ships a ConPTY payload for (x64 is the common case).
- If cross-arch packaging, confirm the node-pty version bundles the target arch payload before rebuilding.
Example fix
// before node config/scripts/rebuild-native-deps.mjs --platform win32 --arch ia32 # fails: no win10-ia32 payload in node-pty/third_party/conpty // after node config/scripts/rebuild-native-deps.mjs --platform win32 --arch x64
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync, readdirSync } from 'node:fs'
import { join } from 'node:path'
const conptyRoot = join('node_modules', 'node-pty', 'third_party', 'conpty')
const arch = process.env.npm_config_arch || process.arch
const found = readdirSync(conptyRoot, { withFileTypes: true })
.filter((e) => e.isDirectory())
.map((e) => join(conptyRoot, e.name, `win10-${arch}`))
.some(existsSync)
if (!found) throw new Error(`No ConPTY payload for win10-${arch}; reinstall node-pty`) Prevention
- Match `--arch` to an architecture node-pty ships a ConPTY payload for (commonly x64).
- Reinstall node-pty cleanly so third_party/conpty is fully populated before rebuild.
- For cross-arch Windows builds, confirm the target arch payload exists first.
When it happens
Trigger: Run rebuild-native-deps.mjs on win32 with `--arch ia32` (or arm64) when the installed node-pty only ships an x64 ConPTY payload, or after a partial npm install that left third_party/conpty empty. The readdirSync/filter/map/find at lines 178-181 returns undefined, and line 182-183 throws.
Common situations: Cross-arch Windows packaging (e.g. building a 32-bit or ARM64 Electron installer from an x64 dev box), a truncated npm cache that omitted the ConPTY third_party payload, or a node-pty version bump that renamed the per-arch directory layout. rebuildArch mismatch with the bundled payload is the dominant cause.
Related errors
- node-pty is missing ${sourceFile}
- node-pty ConPTY runtime file is missing: ${runtimeFile}
- node-pty resolved to ${native.dir}; expected build/Release s
- Unsupported packaged node-pty Windows architecture: ${archit
- Packaged node-pty is missing ${conptyRoot}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/ca8a48221a4a56f4.
Report an issue: GitHub.