Troubleshooting

Diagnose and recover from common Lattice CLI failures and warning states.

On this page

Interactive Prompt Fails (No TTY)

Symptom: command exits with guidance about interactive prompts requiring a TTY.

Actions:

  1. Re-run using explicit flags and --yes.
  2. Provide required values (for example create <project-path> or add --preset form).
  3. Use dry-run first if you want to inspect planned changes.

create --yes Without Project Path

Symptom: create requires [project-path] when using --yes.

Actions:

  1. Run interactive create (lattice create / pnpm lattice create) when non-interactive mode is not required.
  2. If you keep --yes, provide project-path explicitly.

init Outside a Project Root

Symptom: init fails because the CLI cannot find package.json from the current working directory.

Actions:

  1. Run the command from the repo root that owns the target package.json.
  2. Confirm the project already exists before using init; use create for a new directory.
  3. Re-run with --dry-run first after moving to the correct root.

Conflicting Lint Flags

Symptom: Cannot use --lint and --no-lint together.

Actions:

  1. Keep exactly one of those flags on create.
  2. Omit both flags if you want interactive/default behavior.

remove --yes Without Selection

Symptom: no components selected error in non-interactive mode.

Actions:

  1. Provide at least one component name and/or preset.
  2. Or drop --yes to select interactively.

Global CLI

lattice remove dialog --yes

Monorepo Local Script

pnpm lattice remove dialog --yes

Package Manager and Lockfile Drift

Symptom: doctor reports multiple lockfiles or package-manager mismatch warnings.

Actions:

  1. Keep one lockfile in project root.
  2. Align packageManager in package.json with active lockfile manager.
  3. Re-run doctor.

doctor Warnings vs Errors

  • Warnings: command succeeds but reports non-blocking issues.
  • Errors: command fails; required provider conditions are not satisfied.

Typical recovery loop:

  1. Run doctor.
  2. Apply recommended commands shown under Recommended Commands.
  3. Re-run doctor until warnings/errors are resolved.