janhq/jan · error · Error
Found ${backendType} backend(s) but none had a build/bin dir
Error message
Found ${backendType} backend(s) but none had a build/bin directory to install into. What it means
Thrown by installCudaRuntime after the loop over matching backends completes with installed===0. Each iteration computes getBackendDir(backend,version)/build/bin and skips (continue) if that directory does not exist on disk. So the backend is registered as installed but its actual build/bin folder is missing - the install record and the filesystem are out of sync.
Source
Thrown at extensions/llamacpp-extension/src/index.ts:2993
if (targets.length === 0) {
throw new Error(
`No installed "${backendType}" backend found. Install that backend first, then add the CUDA runtime.`
)
}
let installed = 0
for (const t of targets) {
const binDir = await joinPath([
await getBackendDir(t.backend, t.version),
'build',
'bin',
])
if (!(await fs.existsSync(binDir))) continue
await invoke('decompress', { path, outputDir: binDir })
installed++
}
if (installed === 0) {
throw new Error(
`Found ${backendType} backend(s) but none had a build/bin directory to install into.`
)
}
logger.info(
`CUDA runtime installed into ${installed} ${backendType} backend(s)`
)
}
/**
* Update a model with new information.
* @param modelId
* @param model
*/
async update(modelId: string, model: Partial<modelInfo>): Promise<void> {
const modelFolderPath = await joinPath([
await this.getProviderPath(),
'models',
modelId,View on GitHub (pinned to fad3f12a14)
Solutions
- Reinstall the backend cleanly (uninstall then installBackend) so build/bin is fully populated, then retry installCudaRuntime.
- Check the resolved getBackendDir(backend,version) path on disk - if build/bin is absent or partial, remove the backend folder and reinstall.
- Free disk space and disable AV exclusions for the data folder if binaries keep disappearing.
- Confirm the backend manifest version matches the on-disk directory (a version bump may have left an orphan record).
Example fix
// before - registry says vulkan installed but build/bin is missing
await ext.installCudaRuntime('/d/cudart-llama-bin-vulkan.zip') // throws
// after
await ext.uninstallBackend('vulkan', version)
await ext.installBackend('vulkan', version)
// verify build/bin exists
const binDir = await joinPath([await getBackendDir('vulkan', version), 'build', 'bin'])
if (!(await fs.existsSync(binDir))) throw new Error('reinstall failed')
await ext.installCudaRuntime('/d/cudart-llama-bin-vulkan.zip') Defensive patterns
Strategy: validation
Validate before calling
// Confirm each matching backend actually has build/bin on disk
const targets = (await getLocalInstalledBackends()).filter(b => b.backend === backendType)
for (const t of targets) {
const binDir = await joinPath([await getBackendDir(t.backend, t.version), 'build', 'bin'])
if (!(await fs.existsSync(binDir))) throw new Error(`backend ${t.backend}/${t.version} missing build/bin - reinstall it first`)
} Type guard
async function backendHasBinDir(b: { backend: string; version: string }): Promise<boolean> {
const binDir = await joinPath([await getBackendDir(b.backend, b.version), 'build', 'bin'])
return fs.existsSync(binDir)
} Try / catch
try { await ext.installCudaRuntime(path) }
catch (e) {
if (/none had a build\/bin directory/.test(String(e))) { await ext.uninstallBackend(t, v); await ext.installBackend(t, v); await ext.installCudaRuntime(path) }
else throw e
} Prevention
- Verify a backend install is complete (build/bin populated) before marking it installed.
- Detect partial installs at startup and offer to repair them.
- Don't expose the CUDA-runtime install action for backends whose build/bin is missing.
When it happens
Trigger: Backend install was interrupted (download cancelled mid-decompress) leaving a registry entry but no build/bin. The backend directory was moved or deleted by hand. A partial cleanup removed build/bin but left the backend manifest. Cross-drive install where getBackendDir resolves to a path that was never populated.
Common situations: User aborted a backend install mid-way then tried to add CUDA libs. Antivirus/quarantine deleted the .dll/.so files out of build/bin. Disk-full during decompress left the backend half-extracted. The models/backends directory was synced or copied between machines and the binary folder was excluded.
Related errors
- Failed to decompress archive: ${String(e)}
- Failed to normalize backend layout: ${String(e)}
- Not a CUDA runtime archive: ${archiveName}. Expected cudart-
- No installed "${backendType}" backend found. Install that ba
- No supported backend binaries found for this system. Backend
AI-assisted analysis of janhq/jan@fad3f12a14 (2026-08-12).
Data as JSON: /api/errors/37c21275df8e6774.
Report an issue: GitHub.