affaan-m/ECC · error · Error

must be an absolute path explicitly configured by the…

Error message

${EXECUTABLE_OVERRIDE} must be an absolute path explicitly configured by the operator.

What it means

resolveItoExecutable requires ECC_ITO_CLI_EXECUTABLE to contain an absolute path set explicitly by the operator. If a value is present but relative (path.isAbsolute fails), it throws this error, keeping the security invariant that only an operator-configured absolute path is trusted.

Solutions

  1. Set an absolute path: export ECC_ITO_CLI_EXECUTABLE="$PWD/dist/bin/ito.js"
  2. Expand ~ explicitly: ECC_ITO_CLI_EXECUTABLE="$HOME/bin/ito.js"
  3. In .env files, use the fully resolved path rather than a project-relative one

Example fix

// before
export ECC_ITO_CLI_EXECUTABLE=./dist/bin/ito.js
// after
export ECC_ITO_CLI_EXECUTABLE="$(pwd)/dist/bin/ito.js"
Defensive patterns

Strategy: validation

Validate before calling

const path = require('path');
const v = process.env.ECC_ITO_CLI_EXECUTABLE;
if (v && !path.isAbsolute(v)) throw new Error('ECC_ITO_CLI_EXECUTABLE must be absolute');

Type guard

const isAbsPath = (v) => typeof v === 'string' && v.length > 0 && require('path').isAbsolute(v);

Try / catch

try {
  const exe = resolveItoExecutable(process.env);
} catch (e) {
  if (e.message.includes('must be an absolute path')) {
    process.env.ECC_ITO_CLI_EXECUTABLE = path.resolve(process.env.ECC_ITO_CLI_EXECUTABLE);
    retry();
  } else throw e;
}

Prevention

When it happens

Trigger: Setting ECC_ITO_CLI_EXECUTABLE=./dist/bin/ito.js or dist/bin/ito.js — any relative path; also values like "~/bin/ito.js" (tilde is not expanded by the runtime and is not absolute).

Common situations: Composing the env var in shell profiles with relative paths; using ~ expansion that never happens because the variable is read by node directly; .env files with project-relative executable paths.

Understand the failure class

Background: "is not a valid" / "Invalid ... value" environment variable errors: how libraries validate env vars and what to do when they reject yours — this error's family across 48 libraries.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/0f1fb8da97253433. Report an issue: GitHub.

Appendix: source

Thrown at scripts/ito.js:200

      ...withoutJson,
    ]),
  });
}

function resolveItoExecutable(environment = process.env) {
  const configured = environment[EXECUTABLE_OVERRIDE]?.trim();
  if (!configured) {
    throw new Error([
      "The canonical ito-compute-cli is unpublished and ECC will not resolve",
      `a credential-bearing "ito" executable from PATH. Build it from`,
      `${CANONICAL_REPOSITORY.replace(/\.git$/, "")}/${CANONICAL_PACKAGE_PATH},`,
      "run npm ci and npm run check, then set",
      `${EXECUTABLE_OVERRIDE} to the explicit absolute dist/bin/ito.js path.`,
    ].join(" "));
  }

  if (!path.isAbsolute(configured)) {
    throw new Error(
      `${EXECUTABLE_OVERRIDE} must be an absolute path explicitly configured by the operator.`
    );
  }
  return assertUsableExecutable(configured);
}

function assertUsableExecutable(candidate) {
  let canonicalCandidate;
  try {
    canonicalCandidate = fs.realpathSync.native(candidate);
  } catch {
    throw new Error(
      `${EXECUTABLE_OVERRIDE} does not point to a readable local Itô CLI file.`
    );
  }
  if (!isCanonicalItoEntry(canonicalCandidate)) {
    throw new Error(
      `${EXECUTABLE_OVERRIDE} must point to the canonical dist/bin/ito.js entry.`

View on GitHub (pinned to 8321021c54)