stablyai/orca · error
Unsupported packaged node-pty Windows architecture: ${archit
Error message
Unsupported packaged node-pty Windows architecture: ${architecture} What it means
The `normalizeNodePtyWindowsArch` function calls `normalizeElectronArchitecture` to convert the arch enum/string to a normalized name, then rejects anything other than 'x64' or 'arm64'. This is called only during Windows packaging (`ensurePackagedNodePtyConptyRuntime` at line 328) to locate the correct ConPTY payload directory (`win10-x64` or `win10-arm64`). node-pty's ConPTY runtime files are only built for these two architectures.
Source
Thrown at config/packaged-runtime-node-modules.cjs:259
if (!existsSync(join(resourcesDir, 'node_modules', ...packageName.split('/')))) {
missing.add(packageName)
}
}
}
if (missing.size > 0) {
throw new Error(
`Packaged main bundle has bare runtime imports without copied node_modules: ${[
...missing
].join(', ')}`
)
}
}
function normalizeNodePtyWindowsArch(electronArch) {
const architecture = normalizeElectronArchitecture(electronArch)
if (architecture !== 'x64' && architecture !== 'arm64') {
throw new Error(`Unsupported packaged node-pty Windows architecture: ${architecture}`)
}
return architecture
}
function normalizeElectronArchitecture(electronArch) {
const architecture =
typeof electronArch === 'number'
? ELECTRON_ARCHITECTURE_BY_ENUM[electronArch]
: electronArch === 'armv7l'
? 'arm'
: electronArch
if (!PACKAGED_NATIVE_ARCHITECTURES.has(architecture)) {
throw new Error(`Unsupported packaged runtime architecture: ${String(electronArch)}`)
}
return architecture
}
function pruneNodePtyNativeDirectories(directory, platformPrefix, electronArch, allowsSuffix) {View on GitHub (pinned to 1136503c6a)
Solutions
- Check the Windows build target architecture in electron-builder config — it should only be 'x64' and/or 'arm64'.
- If you need ia32 or arm Windows builds, node-pty's ConPTY payload doesn't ship for those — you'd need to build node-pty from source for that arch or skip ConPTY.
- Log `electronArch` at the call site (prunePackagedNodePty → ensurePackagedNodePtyConptyRuntime) to see what value is being passed.
Defensive patterns
Strategy: validation
Validate before calling
// Verify Windows arch is supported for node-pty ConPTY before packaging
function assertNodePtyWindowsArch(archEnum) {
const map = { 0: 'ia32', 1: 'x64', 2: 'arm', 3: 'arm64' }
const arch = map[archEnum]
if (arch !== 'x64' && arch !== 'arm64') {
throw new Error(`node-pty ConPTY only supports x64/arm64 on Windows, got: ${arch}`)
}
} Type guard
function isSupportedNodePtyWindowsArch(arch: string): arch is 'x64' | 'arm64' {
return arch === 'x64' || arch === 'arm64'
} Prevention
- Only target x64 and arm64 for Windows builds.
- Don't add ia32 or arm to the Windows target arch list.
- Check node-pty's ConPTY availability before adding new Windows arch targets.
When it happens
Trigger: Packaging node-pty for Windows with an architecture that normalizes to 'ia32' or 'arm' — e.g., context.arch === 0 (ia32) or 2 (armv7l). Passing a string arch like 'ia32' or 'arm' to the packaging step. This is narrower than the general arch check (error [19]) because ConPTY only ships for x64/arm64.
Common situations: Adding ia32 or arm to the Windows build target architecture list. A future Electron version adding new arch enum values. Cross-compiling for a Windows architecture that node-pty doesn't support.
Related errors
- Packaged node-pty has no ConPTY payload for win10-${windowsA
- Packaged node-pty is missing ${conptyRoot}
- Packaged node-pty is missing ${sourceFile}
- Unsupported packaged runtime architecture: ${String(electron
- node-pty has no ConPTY runtime payload for win10-${rebuildAr
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/21d6249c4bcbfc5f.
Report an issue: GitHub.