Skip to content

opentui: fatal: undefined is not an object (evaluating 'c3[mode2]') when using custom theme. #4365

Closed

Description

@ariane-emory

Description

This error occurs in latest when the project-local opencode.json file contains:

{
  "$schema": "https://opencode.ai/config.json",
  "theme": "my-matrix"
}

The file at ~/.config/opencode/themes/my-matrix.json is a modified version of the standard Matrix theme with this one line only changed:

"background": { "dark": "none", "light": "none" },
TypeError: undefined is not an object (evaluating 'c3[mode2]')
    at resolveColor (src/cli/cmd/tui/context/theme.tsx:64:25)
    at <anonymous> (src/cli/cmd/tui/context/theme.tsx:67:18)
    at map (native:1:11)
    at resolveTheme (src/cli/cmd/tui/context/theme.tsx:66:57)
    at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
    at readSignal (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:660:67)
    at get (src/cli/cmd/tui/context/theme.tsx:106:18)
    at <anonymous> (src/cli/cmd/tui/app.tsx:531:17)
    at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
    at createRenderEffect (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:240:75)
    at <anonymous> (src/cli/cmd/tui/app.tsx:517:5)
    at untrack (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:475:12)
    at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
    at devComponent (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:593:3)
    at children (src/cli/cmd/tui/context/helper.tsx:18:24)
    at <anonymous> (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:1057:29)
    at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
    at createMemo (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:273:10)
    at children (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:616:20)
    at untrack (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:475:12)
    at <anonymous> (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:1052:36)
    at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
    at createRenderEffect (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:240:75)
    at provider (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:1052:5)
    at untrack (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:475:12)
    at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
    at devComponent (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:593:3)
    at <anonymous> (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:1532:21)
    at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
    at createMemo (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:273:10)
    at untrack (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:475:12)
    at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
    at devComponent (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:593:3)
    at untrack (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:475:12)
    at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
    at devComponent (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:593:3)
    at children (src/cli/cmd/tui/component/dialog-command.tsx:88:14)
    at <anonymous> (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:1057:29)
    at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
    at createMemo (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:273:10)
    at children (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:616:20)
    at untrack (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:475:12)
    at <anonymous> (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:1052:36)
    at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
    at createRenderEffect (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:240:75)
    at provider (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:1052:5)
    at untrack (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:475:12)
    at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
    at devComponent (../../node_modules/.bun/[email protected]...

OpenCode version

1.0.65

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

MacOS latest Sequoia

Terminal

iTerm2

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 16, 2025
  2. github-actions commented on Nov 16, 2025

    @github-actions
    Contributor

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

    All of these issues appear to be related to the same underlying problem in theme resolution at resolveColor (src/cli/cmd/tui/context/theme.tsx:64:25) when custom themes contain certain values that can't be processed properly.

    Feel free to ignore if none of these address your specific case.

  3. rekram1-node commented on Nov 16, 2025

    @rekram1-node
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions