Skip to content

origin/main local install is broken due to stale opencode package metadata #19166

Closed as not planned

Description

@OpenCodeEngineer

Summary

Checking out origin/main breaks bun run install:local.

Repro

  1. git fetch
  2. git checkout origin/main
  3. bun run install:local

Current failures

  • packages/opencode/src/storage/db.ts imports #db, but packages/opencode/package.json on main is missing the imports map.
  • packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx uses newer @opentui/core APIs, but packages/opencode/package.json on main still pins @opentui/core and @opentui/solid to 0.1.87.
  • bun.lock on main still resolves the old 0.1.87 OpenTUI packages, which leads to mixed runtime state.

Expected

bun run install:local succeeds on origin/main.

Acceptance criteria

  • packages/opencode/package.json on main includes the required #db import map.
  • packages/opencode/package.json and bun.lock on main are aligned to the OpenTUI version expected by the code.
  • bun run install:local succeeds from a clean checkout of origin/main.

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 25, 2026
  2. github-actions commented on Mar 25, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • Fix broken bun run install:local on dev #19155: Same root causes described — missing #db import map and mismatched @opentui package versions causing bun run install:local to fail. That issue targets the dev branch while this one targets origin/main, but the underlying problems and fixes appear identical.
  3. OpenCodeEngineer commented on Mar 25, 2026

    @OpenCodeEngineer
    Author

    Status update:

    This reproduced on a fork main branch, not on an upstream main branch in anomalyco/opencode.

    I traced it to stale packages/opencode/package.json metadata relative to the code already present on that branch:

    • missing #db import map
    • stale OpenTUI version pin
    • stale GitLab package names
    • missing cross-spawn
    • stale tool registry import

    The fix has been validated locally with:

    • bun install
    • bun run install:local
    • ~/.local/bin/opencode --version
    • codesign --verify --verbose=4 ~/.local/bin/opencode

    The fork-side fix was merged here:

  4. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  5. github-actions commented on Jul 5, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions