You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TUI half fails to load on OpenCode 2.4.x: "Cannot find package 'jsonc-parser'" (sidebar, /quota, status line missing) #531
@slkiser/opencode-quota6.2.2 (checked the 6.3.0 tarball too: same import is present)
Plugin installed as a local package in ~/.config/opencode/plugins/opencode-quota (package.json with ./tui → dist/tui.js, node_modules/jsonc-parser@3.3.1 installed)
Symptom
After upgrading OpenCode, the quota sidebar panel, status line and /quota window stopped appearing. The server side keeps working; only the TUI half fails to set up. opencode plugin list shows only the server entry, @slkiser/opencode-quota.server.
The same warning repeats on every CLI plugin reconciliation. The server entrypoint (dist/index.js) loads without error.
Cause
The TUI entrypoint reaches these bare imports of jsonc-parser:
dist/settings/schema.js:8
dist/settings/convert.js:11
dist/settings/file.js:9
dist/lib/opencode-config-editor.js:3
dist/lib/opencode-config-files.js:19
The package's own node_modules/jsonc-parser is present and normal Node resolution from that file works:
node -e "import('./dist/settings/schema.js').then(() => console.log('ok'))"# ok
But OpenCode's CLI TUI plugin loader (local discovery path, stage=read) does not resolve the plugin's own node_modules for non-peer bare specifiers — it can resolve the packages OpenCode provides (@opencode/plugin/tui, @opentui/*, solid-js) but not jsonc-parser, so importing dist/tui.js throws and the entire TUI half is discarded.
Workaround that works
Point the five imports at the vendored copy with a relative path:
After a reload the CLI reconciliation completes with plugins=16 and no failures, and the sidebar, status line and /quota window come back.
Suggested fix
The TUI build should not contain bare, non-peer runtime imports:
Bundle jsonc-parser into the TUI dist (it is small, ~10 KB of ESM), or
re-export the required parser helpers from a relative module inside dist/, or
avoid the dependency in the TUI path entirely.
This likely affects any TUI plugin that keeps a non-peer runtime dependency external when loaded through local plugin discovery, so it may be worth a note in the README as well.
Happy to test a patched build against OpenCode 2.4.3 if that helps.
Activity
github-actions commentedon Dec 1, 2026
Thanks for opening this! This issue was not made with one of our forms, so we added the
needs infolabel.Please open a new issue with a form: https://github.com/slkiser/opencode-quota/issues/new/choose. The forms ask for the details we need to help.