opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(postinstall): prebuild required workspace packages to prevent bun dev from failing

Open 2012syang opened this issue 4 months ago • 3 comments

  • Fix: Missing prebuild of required workspace packages during postinstall causes bun run dev to fail after bun install (see #1579).
  • Solution: Add generate/build steps for packages/sdk/js in the postinstall phase.
  • Verification: In a fresh environment, bun install && bun run dev starts successfully with no additional manual steps.

2012syang avatar Aug 20 '25 13:08 2012syang

Hmm for me this isn't necessary, maybe specific to your environment?

Can you share more about your OS / (chip version if Mac), bun version, node version

if I do a fresh clone of opencode, run bun i then bun run dev I have no issues

rekram1-node avatar Aug 20 '25 14:08 rekram1-node

yeah some people keep having this issue and i can't replicate it

thdxr avatar Aug 21 '25 15:08 thdxr

I have same problem

This is the issue: the @opencode-ai/sdk package only has dist folder in package.json files, so bun install only copies dist folder and not src. So development imports fail

Opened https://github.com/sst/opencode/pull/2567

remorses avatar Sep 12 '25 17:09 remorses