diegosouzapw/OmniRoute · error · InstallError

Could not read installed version from…

Error message

Could not read installed version from node_modules/@askalf/dario/package.json

What it means

Post-install verification guard in the Dario installer: after `runNpm install` of @askalf/dario into installDir, getInstalledVersion() found no readable version in node_modules/@askalf/dario/package.json. npm exited without error but the package.json is absent or unparseable — typically a partial/failed extraction, cache corruption, or a permission problem in the install directory.

Solutions

  1. Remove the Dario install directory and re-run the install
  2. Run `npm cache clean --force` and retry
  3. Confirm the service install dir is writable and not on a full disk
  4. Check npm logs (npm log) for a silent extraction failure
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/lib/services/installers/dario.ts:142 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/af172f882567ab76. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/services/installers/dario.ts:142

      JSON.stringify(
        { name: "omniroute-dario-host", version: "0.0.0", private: true, dependencies: {} },
        null,
        2
      ),
      "utf8"
    );
  }

  await runNpm(
    ["install", `${DARIO_PACKAGE}@${version}`, "--omit=dev", "--no-audit", "--no-fund"],
    // `--prefix` is passed via `prefix` (→ npm_config_prefix env) instead of an
    // argv path so an install dir with spaces survives the Windows shell (#5379).
    { cwd: installDir, prefix: installDir }
  );

  const installedVersion = await getInstalledVersion();
  if (!installedVersion) {
    throw new InstallError(
      "Could not read installed version from node_modules/@askalf/dario/package.json",
      "Dario instalado mas versão não pôde ser lida.",
      500
    );
  }

  await upsertVersionManagerTool({
    tool: "dario",
    installedVersion,
    binaryPath: getCliPath(),
    status: "stopped",
    port: DARIO_DEFAULT_PORT,
  });

  // Invalidate cache so next getLatestVersion() re-fetches
  latestVersionCache = null;

  return {

View on GitHub (pinned to a179ffed5b)