Skip to content

[agent-cli] install with no arguments installs the lockfile when expo is not installed yet - #233

Draft
vonovak wants to merge 1 commit into
mainfrom
vonovak/install-bootstraps-lockfile-2
Draft

vonovak wants to merge 1 commit into
mainfrom
vonovak/install-bootstraps-lockfile-2

Conversation

@vonovak

@vonovak vonovak commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

In a fresh clone or git worktree, expo does not resolve. npx @expo/agent-cli install with no arguments ran npx expo install, which cannot read the SDK of a project with no node_modules and failed with "ConfigError: expo not installed". A named install <package> failed the same way. typecheck with no compiler suggested install typescript --dev even when package.json already declared typescript, and that edits package.json.

Steps to reproduce

  1. Copy an Expo app without its node_modules.
  2. Run npx @expo/agent-cli install.

Fix

When expo does not resolve, a bare install runs the lockfile's frozen install in the lockfile's directory: npm ci, bun install --frozen-lockfile, pnpm install --frozen-lockfile or yarn install (npm install when there is no lockfile). It then syncs skills and exits with the package manager's code. A named package is refused with DEPENDENCIES_NOT_INSTALLED, and its Try: line is the bare install. typecheck suggests the bare install when package.json declares typescript. The rule is in llp/0010 §Forwarded codes.

Alternatives considered

Run npx expo install with an SDK read from package.json's range. Rejected: it installs whatever that range resolves to now, not what the lockfile pins.

Verification

  • Red test: e2e/__tests__/install-bootstrap-test.ts (4 cases: npm ci and bun install --frozen-lockfile against stub package managers, the exit code, the named-package refusal) and one new typecheck-test.ts case. All 5 failed on main and pass here.
  • bun run typecheck, bunx vitest run and bun run lint pass. The install, install-check and typecheck e2e files pass.
  • Live check: on a copy of apps/eas-example with no node_modules, install expo-sqlite stops with DEPENDENCIES_NOT_INSTALLED, and the bare install ran npm install and exited 0. After it, expo resolves at 58.0.5.

Watch

yarn install is not frozen, because Yarn 1 and Berry spell that flag differently.

🤖 Generated with Claude Code

… is not installed yet

A bare `install` in a project whose `expo` package does not resolve runs the lockfile's frozen install (npm ci, bun install --frozen-lockfile, pnpm install --frozen-lockfile, yarn install) in the lockfile's directory, then syncs skills and exits with the package manager's code. `npx expo install` cannot read the SDK of a project with no node_modules and fails with "ConfigError: expo not installed".

A named package in that state is refused with DEPENDENCIES_NOT_INSTALLED, and the suggested command is the bare install. A typecheck with no compiler suggests the bare install when package.json declares typescript.

Red before: e2e install-bootstrap-test (4 cases) and the new typecheck-test case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vonovak
vonovak added this pull request to stack #235 October 30, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant