stablyai/orca · error · Error
node-pty ConPTY runtime file is missing: ${runtimeFile}
Error message
node-pty ConPTY runtime file is missing: ${runtimeFile} What it means
Thrown by assertNodePtyWindowsConptyRuntime inside the Electron native-module probe (probeElectronNativeModules) on win32 when node-pty's build/Release/conpty directory is missing one of the expected ConPTY runtime files. This is the probe-time counterpart to the restore step (errors 169/170): it verifies that the DLLs the restore step copies are actually present at load time. If the restore was skipped or its files were removed, loading node-pty under Electron on Windows will fail at first ConPTY use.
Source
Thrown at config/scripts/rebuild-native-deps.mjs:506
projectRequire(moduleName)
}
function assertNodePtyWindowsConptyRuntime(nativeDir) {
if (process.platform !== 'win32' || !isNodePtyReleaseBuildDir(nativeDir)) {
return
}
const runtimeDir = resolve(
process.cwd(),
'node_modules',
'node-pty',
'build',
'Release',
'conpty'
)
for (const filename of ${JSON.stringify(NODE_PTY_CONPTY_RUNTIME_FILES)}) {
const runtimeFile = resolve(runtimeDir, filename)
if (!existsSync(runtimeFile)) {
throw new Error('node-pty ConPTY runtime file is missing: ' + runtimeFile)
}
}
}
function isNodePtyReleaseBuildDir(nativeDir) {
return typeof nativeDir === 'string' && nativeDir.replace(/\\\\/g, '/').includes('build/Release/')
}
function getNodePtyNativeModuleName() {
if (process.platform !== 'win32') {
return 'pty'
}
const match = /(\\d+)\\.(\\d+)\\.(\\d+)/g.exec(release())
const buildNumber = match && match.length === 4 ? Number.parseInt(match[3], 10) : 0
return buildNumber >= 18309 ? 'conpty' : 'pty'
}
function formatError(error) {View on GitHub (pinned to 1136503c6a)
Solutions
- Rerun rebuild-native-deps.mjs so the ConPTY restore step (errors 169/170's function) copies the DLLs into build/Release/conpty.
- Confirm node-pty's build/Release/conpty.node exists before the restore runs (the restore returns early otherwise).
- Reinstall node-pty to repopulate the third_party/conpty source payload, then rerun the rebuild.
Example fix
// before # build/Release/conpty exists but is missing a DLL node config/scripts/rebuild-native-deps.mjs --platform win32 # -> node-pty ConPTY runtime file is missing: ... // after rm -rf node_modules/node-pty && npm install node config/scripts/rebuild-native-deps.mjs --platform win32
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync, readdirSync } from 'node:fs'
import { join } from 'node:path'
if (process.platform === 'win32') {
const runtimeDir = join('node_modules', 'node-pty', 'build', 'Release', 'conpty')
const files = existsSync(runtimeDir) ? readdirSync(runtimeDir) : []
if (files.length === 0) {
throw new Error('ConPTY runtime dir empty; rerun rebuild-native-deps.mjs --platform win32')
}
} Prevention
- Rerun rebuild-native-deps.mjs on Windows so the ConPTY restore step copies the DLLs.
- Ensure build/Release/conpty.node exists before the restore (the restore returns early otherwise).
- Do not strip build/Release/conpty after rebuild; the probe validates its presence.
When it happens
Trigger: On win32, after a rebuild where the ConPTY DLL-restore step did not run (e.g. node-pty was rebuilt via @electron/rebuild but the post-restore in errors 169/170's function was bypassed) or where build/Release/conpty was later deleted. The loop over NODE_PTY_CONPTY_RUNTIME_FILES at lines 502-506 throws on the first missing file.
Common situations: The restore step returned early (conpty.node did not exist at restore time), a clean/strip step removed build/Release/conpty after the restore, or a partial install left only some DLLs. This fires when node-pty is probed under Electron on Windows without the runtime DLLs in place.
Related errors
- node-pty has no ConPTY runtime payload for win10-${rebuildAr
- node-pty is missing ${sourceFile}
- 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/c6176e914d9ddda4.
Report an issue: GitHub.