rohitg00/agentmemory · warning

No package.json in current directory. Skipping JS dependency

Error message

No package.json in current directory. Skipping JS dependency upgrade.

What it means

A warning emitted by the `upgrade` command when the current working directory has no package.json, so there is nothing to upgrade and the JS dependency step is skipped. The upgrade continues to the engine reinstall prompt.

Source

Thrown at src/cli.ts:3197

      requireSuccess(installOk, "pnpm install");
      runCommand(pnpmBin, ["up", "iii-sdk@0.11.2"], {
        label: "Pinning iii-sdk@0.11.2",
        optional: true,
      });
    } else if (npmBin) {
      const installOk = runCommand(npmBin, ["install"], {
        label: "Refreshing dependencies (npm install)",
      });
      requireSuccess(installOk, "npm install");
      runCommand(npmBin, ["install", "iii-sdk@0.11.2"], {
        label: "Pinning iii-sdk@0.11.2",
        optional: true,
      });
    } else {
      p.log.warn("No package manager found (pnpm/npm). Skipping JS dependency upgrade.");
    }
  } else {
    p.log.warn("No package.json in current directory. Skipping JS dependency upgrade.");
  }

  const upgradeEngine = await p.confirm({
    message: "Re-run the iii-engine install script (curl | sh)?",
    initialValue: true,
  });
  if (p.isCancel(upgradeEngine)) {
    p.cancel("Cancelled.");
    return process.exit(0);
  }
  if (upgradeEngine === true) {
    await runIiiInstaller();
  } else {
    p.log.info("Skipped iii-engine installer.");
  }

  if (dockerBin) {
    runCommand(dockerBin, ["pull", `iiidev/iii:${IIPINNED_VERSION}`], {

View on GitHub (pinned to e04ba88819)

Solutions

  1. cd into the project directory that contains the package.json and re-run the upgrade
  2. Run `npm init -y` first if you intend to set up a new project here
  3. Upgrade manually in the right project: npm install iii-sdk@0.11.2

Example fix

// before
$ cd ~ && agentmemory upgrade
// after
$ cd ~/my-agent-project && agentmemory upgrade
Defensive patterns

Strategy: validation

Validate before calling

const fs = require("fs");
if (!fs.existsSync("package.json")) console.error("Run the upgrade from a directory containing package.json");

Prevention

When it happens

Trigger: Running the upgrade command from a directory that does not contain a package.json file.

Common situations: Running `agentmemory upgrade` from the home directory or an unrelated project instead of the project that depends on iii-sdk/agentmemory.

Related errors


AI-assisted analysis of rohitg00/agentmemory@e04ba88819 (2026-08-30). Data as JSON: /api/errors/f77686e20439f10a. Report an issue: GitHub.