Repository navigation
Description
Description
On 2.4.2, the TUI half of a package plugin fails to load when OpenCode starts in a project whose .browserslistrc contains a supports query. The server half of the same plugin loads normally.
TUI plugin error
Plugin: @sveltejs/opencode
Status: failed
Runtime: tui
Error: undefined is not an object (evaluating 'l.released')
The only l.released in the 2.4.2 binary is in the bundled browserslist's supports query handler:
supports: { select(t, r) { … for (var u in i) { var l = ra(u, t), c = l.released.length - 1; …ra() returns undefined for any browser that the bundled caniuse feature data lists but the bundled agents data lacks.
The bundled @babel/core reaches this code during target resolution. If no targets are passed and browserslistConfigFile is not false, it calls findConfigFile(configPath) and then runs browserslist on the project's config. It looks like the plugin .jsx transpile picks up the user's project browserslist config.
The same query resolves fine with standalone browserslist@4.29.6, so the bundled browserslist/caniuse data seems inconsistent.
Expected:
- Plugin transpiling should not read the project's browserslist config (pass
browserslistConfigFile: falseor explicittargets). - At minimum, a project's browserslist config should not stop TUI plugins from loading.
Related but different: #54943 / #61146 (time.released on plugin models).
Plugins
@sveltejs/opencode 0.1.17 (TUI entry tui.jsx), opencode-supermemory, superpowers (git)
OpenCode version
2.4.2. Regression: the same plugin's TUI half worked on 2.3.2 in the same project.
Steps to reproduce
- Add
@sveltejs/opencodetopluginsin the globalopencode.jsonc. - Create an empty directory with a
.browserslistrccontaining:defaults and fully supports es6-module - Run
opencodein that directory. The TUI plugin fails with the error above. - Delete
.browserslistrcand runopencodeagain. The plugin loads.
Reproduced on Windows 11 with a directory that contains only that .browserslistrc.
Log excerpt (opencode.log, path redacted):
level=WARN message="plugin operation failed" component=plugin stage=load durationMs=244 error="undefined is not an object (evaluating 'l.released')" target=@sveltejs/opencode entrypoint=file:///C:/Users/<user>/.cache/opencode/npm/@sveltejs/opencode@latest/<id>/node_modules/@sveltejs/opencode/tui.jsx role=cli
The same file's index.js (server entry) loads without error in the same run.
Operating System
Windows 11 Pro 10.0.26200 (x64)
Terminal
Windows Terminal
Activity
opencodejr commentedon Nov 27, 2026
Seen with a simulated model or a mock server, not a real provider; a maintainer should confirm.
Thanks for the detailed report and the minimal repro. I reproduced this on 2.4.2 on Linux with
@sveltejs/opencode0.1.17 in the global config:.browserslistrccontainingdefaults and fully supports es6-module, the footer shows1 plugin failedand/pluginslists the TUI entry asfailed. The server entry of the same plugin loads..browserslistrc, the TUI plugin loads.supports es6-modulefails too.defaultsand> 1%load, which matches your diagnosis.One difference: on Linux the error dialog and log show
First argument must be an Error objectinstead ofl.released. It is the same failure: the same log line, the same plugin and the sametui.jsxentry.It also still happens with the compiled build of today's
dev(0.0.0-dev-1363). Runningdevfrom source (740bd1d), the plugin loads. I don't think that's a fix: the dependencies involved are the same version as in 2.4.2, so it's more likely the code bundled into the compiled binary is what breaks. I couldn't confirm the 2.3.2 comparison myself.The recording, screenshots and drive script below show the reproduction. The script has a
NO_BROWSERSLISTRC=1control run. A maintainer will take it from here.https://anoma.ly/team/github-bot/media/333d3e2ced1d412565f5d433ceeb6357cce92af83c7920428a3f5132468554f3.mp4
Reproduction script (drive.ts)
Run it with opencode-drive:
opencode-drive run ./drive.ts. It drivesopencodefrom yourPATH; setOC_DEVto the path of an OpenCode checkout to run that from source instead.