diegosouzapw/OmniRoute · error · InstallError
Could not read installed version from…
Error message
Could not read installed version from node_modules/@maximhq/bifrost/package.json
What it means
Post-install verification guard in the Bifrost installer: after `runNpm install` completes, getInstalledVersion() re-reads node_modules/@maximhq/bifrost/package.json inside BIFROST_INSTALL_DIR and this fires when that read yields nothing — meaning npm reported success but the package.json is missing, unreadable, or lacks a version field (partial install, npm cache corruption, disk/permission issue, or the package failed to extract).
Solutions
- Delete the install dir and retry the install to rule out a partially extracted node_modules
- Verify npm/node versions and available disk space on the host
- Clear the npm cache (npm cache clean --force) if corruption is suspected
- Check filesystem permissions on the DATA_DIR where BIFROST_INSTALL_DIR lives
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at src/lib/services/installers/bifrost.ts:101 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/43d4adfcdb80b936.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/services/installers/bifrost.ts:101
hostPkgPath,
JSON.stringify(
{ name: "omniroute-bifrost-host", version: "0.0.0", private: true, dependencies: {} },
null,
2
),
"utf8"
);
}
await runNpm(
["install", `${BIFROST_PACKAGE}@${version}`, "--omit=dev", "--no-audit", "--no-fund"],
// `--prefix` via `prefix` (→ npm_config_prefix env) so paths with spaces survive Windows shell
{ cwd: BIFROST_INSTALL_DIR, prefix: BIFROST_INSTALL_DIR }
);
const installedVersion = await getInstalledVersion();
if (!installedVersion) {
throw new InstallError(
"Could not read installed version from node_modules/@maximhq/bifrost/package.json",
"Bifrost instalado mas versão não pôde ser lida.",
500
);
}
await upsertVersionManagerTool({
tool: "bifrost",
installedVersion,
binaryPath: getBinPath(),
status: "stopped",
port: BIFROST_DEFAULT_PORT,
});
// Invalidate cache so next getLatestVersion() re-fetches
latestVersionCache = null;
return {View on GitHub (pinned to a179ffed5b)