diegosouzapw/OmniRoute · error · InstallError

Could not read installed version from…

Error message

Could not read installed version from node_modules/mux/package.json

What it means

Post-install verification guard in the Mux installer: after `runNpm install` of the mux package into MUX_INSTALL_DIR, getInstalledVersion() returned nothing — the expected node_modules/mux/package.json is missing, unreadable, or has no version. npm's exit code masked a partial install (extraction failure, cache corruption, permissions).

Solutions

  1. Wipe MUX_INSTALL_DIR's node_modules and retry the install
  2. Verify disk space and write permissions in the data directory
  3. Clear the npm cache and reinstall
  4. Inspect npm's verbose log to find why extraction was skipped
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/lib/services/installers/mux.ts:108 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/8451704f0a5ea99b. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/services/installers/mux.ts:108

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

  await runNpm(
    ["install", `${MUX_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: MUX_INSTALL_DIR, prefix: MUX_INSTALL_DIR }
  );

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

  await upsertVersionManagerTool({
    tool: "mux",
    installedVersion,
    binaryPath: getServerPath(),
    status: "stopped",
    port: MUX_DEFAULT_PORT,
  });

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

  return {

View on GitHub (pinned to a179ffed5b)