[PR #8815] fix(bun): reinstall plugins when cache module missing #12880

Closed
opened 2026-02-16 18:17:46 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/8815

State: closed
Merged: Yes


What does this PR do?

Fixes startup hangs when the plugin cache is partially deleted by re-installing a plugin if its cached module directory is missing (even when package.json still lists the dependency). Fixes #5338.

How did you verify your code works?

Reproducing the issue:

rm -rf ~/.cache/opencode/node_modules ~/.cache/opencode/bun.lock
bun dev  # hangs with blank screen

Verify fix:

rm -rf ~/.cache/opencode/node_modules ~/.cache/opencode/bun.lock
bun dev  # now starts correctly, reinstalls plugins automatically
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/8815 **State:** closed **Merged:** Yes --- ### What does this PR do? Fixes startup hangs when the plugin cache is partially deleted by re-installing a plugin if its cached module directory is missing (even when `package.json` still lists the dependency). Fixes #5338. ### How did you verify your code works? **Reproducing the issue:** ```bash rm -rf ~/.cache/opencode/node_modules ~/.cache/opencode/bun.lock bun dev # hangs with blank screen ``` **Verify fix:** ```bash rm -rf ~/.cache/opencode/node_modules ~/.cache/opencode/bun.lock bun dev # now starts correctly, reinstalls plugins automatically ```
yindo added the pull-request label 2026-02-16 18:17:46 -05:00
yindo closed this issue 2026-02-16 18:17:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12880