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
Local development flow not working due to new plugin logic #1898
This is related to #1579, which was prematurely closed by the author.
How to reproduce
Discussion
This is likely due to the new plugin logic in packages/opencode/src/plugin/index.ts importing the @opencode-ai/sdk, which does not resolve without first being built.
Ideal solution addresses the root cause of the issue through better dependency resolution or changed logic in plugin/index.ts.
(I created a draft PR last week which fixed the issue in a roundabout way, not recommended to implement)
Error text for indexing:
error: Cannot find module '@opencode-ai/sdk' from '/Users/masonhall/personal/projects/opencode/packages/opencode/src/plugin/index.ts'
Both issues describe the exact same error: Cannot find module '@opencode-ai/sdk' from '/[path]/packages/opencode/src/plugin/index.ts' when trying to run the local development environment. Issue #1579 specifically mentions the same problem occurs after running bun install and bun run packages/opencode/src/index on a clean repo clone.
If this doesn't address your specific case, please let us know how this issue differs from the previous report.
Activity
github-actions commentedon Aug 13, 2025
👋 This issue might be a duplicate of existing issues. Please check:
Both issues describe the exact same error:
Cannot find module '@opencode-ai/sdk' from '/[path]/packages/opencode/src/plugin/index.ts'when trying to run the local development environment. Issue #1579 specifically mentions the same problem occurs after runningbun installandbun run packages/opencode/src/indexon a clean repo clone.If this doesn't address your specific case, please let us know how this issue differs from the previous report.
rekram1-node commentedon Aug 13, 2025
@fmhall I cannot replicate this, is it perhaps something specific to your environment?
fmhall commentedon Aug 13, 2025
That is so strange.
I'm on a standard Mac M4 max.
bunversion:v1.2.20nodeversion:v24.5.0npmversion:v11.5.2Anything else I should be checking?
From the other issue (#1579), it looks like other people are having this issue as well.
rekram1-node commentedon Aug 13, 2025
@fmhall I have no idea idk if this helps but here is my setup:
I am on Mac M3
rekram1-node commentedon Aug 14, 2025
@fmhall did you ever get this figured out?
Rhain commentedon Aug 15, 2025
Try using an absolute path—it worked for me after I specified the absolute path.
bun run --conditions=development /Users/rhain/xxxx/opencode/packages/opencode/src/index.ts serve --print-logsrekram1-node commentedon Aug 16, 2025
closing as I cannot replicate, haven't seen many people mentioning this. If the issue persists lmk
fmhall commentedon Aug 27, 2025
Somehow it's working for me now, I'm using an older version of node, but not sure that was it. Thank you @rekram1-node !
fmhall commentedon Aug 28, 2025
I think this fixed it: 9a31863