{"record":{"id":"43d4adfcdb80b936","repo":"diegosouzapw/OmniRoute","slug":"could-not-read-installed-version-from-node-modules","errorCode":null,"errorMessage":"Could not read installed version from node_modules/@maximhq/bifrost/package.json","messagePattern":"Could not read installed version from node_modules/@maximhq/bifrost/package\\.json","errorType":"exception","errorClass":"InstallError","httpStatus":500,"severity":"error","filePath":"src/lib/services/installers/bifrost.ts","lineNumber":101,"sourceCode":"      hostPkgPath,\n      JSON.stringify(\n        { name: \"omniroute-bifrost-host\", version: \"0.0.0\", private: true, dependencies: {} },\n        null,\n        2\n      ),\n      \"utf8\"\n    );\n  }\n\n  await runNpm(\n    [\"install\", `${BIFROST_PACKAGE}@${version}`, \"--omit=dev\", \"--no-audit\", \"--no-fund\"],\n    // `--prefix` via `prefix` (→ npm_config_prefix env) so paths with spaces survive Windows shell\n    { cwd: BIFROST_INSTALL_DIR, prefix: BIFROST_INSTALL_DIR }\n  );\n\n  const installedVersion = await getInstalledVersion();\n  if (!installedVersion) {\n    throw new InstallError(\n      \"Could not read installed version from node_modules/@maximhq/bifrost/package.json\",\n      \"Bifrost instalado mas versão não pôde ser lida.\",\n      500\n    );\n  }\n\n  await upsertVersionManagerTool({\n    tool: \"bifrost\",\n    installedVersion,\n    binaryPath: getBinPath(),\n    status: \"stopped\",\n    port: BIFROST_DEFAULT_PORT,\n  });\n\n  // Invalidate cache so next getLatestVersion() re-fetches\n  latestVersionCache = null;\n\n  return {","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/services/installers/bifrost.ts#L83-L119","documentation":"Error \"Could not read installed version from node_modules/@maximhq/bifrost/package.json\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/services/installers/bifrost.ts:101 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}