Running opencode without Node installed results in an error #8054

Open
opened 2026-02-16 18:09:01 -05:00 by yindo · 2 comments
Owner

Originally created by @TomasHubelbauer on GitHub (Jan 30, 2026).

Originally assigned to: @thdxr on GitHub.

Description

I use the Bun install method for OpenCode and my server only has the Bun runtime, not Node. When I run opencode after installing it with Bun, I get this error:

> bun add -g opencode-ai
> opencode
bun add -g opencode-ai

Can OpenCode be run with Bun? Except for bunx opencode I mean.

Plugins

No response

OpenCode version

1.1.44

Steps to reproduce

> bun add -g opencode-ai
> opencode
bun add -g opencode-ai

Do not have node in the env

Screenshot and/or share link

No response

Operating System

macOS

Terminal

macOS Terminal

Originally created by @TomasHubelbauer on GitHub (Jan 30, 2026). Originally assigned to: @thdxr on GitHub. ### Description I use the Bun install method for OpenCode and my server only has the Bun runtime, not Node. When I run `opencode` after installing it with Bun, I get this error: ``` > bun add -g opencode-ai > opencode bun add -g opencode-ai ``` Can OpenCode be run with Bun? Except for `bunx opencode` I mean. ### Plugins _No response_ ### OpenCode version 1.1.44 ### Steps to reproduce ``` > bun add -g opencode-ai > opencode bun add -g opencode-ai ``` Do not have `node` in the env ### Screenshot and/or share link _No response_ ### Operating System macOS ### Terminal macOS Terminal
yindo added the bug label 2026-02-16 18:09:01 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 30, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7960: OpenCode CLI Critical Runtime Failure - Similar Bun runtime incompatibility issues in specific environments
  • #8023: Platform binary selection failure after Bun installation
  • #7440: Questions about correct platform binary installation
  • #6994: Windows MCP local server fails with Bun - Related to Bun runtime issues on specific platforms
  • #9870: Windows dependency resolution issues with cached node_modules

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 30, 2026): This issue might be a duplicate of existing issues. Please check: - #7960: OpenCode CLI Critical Runtime Failure - Similar Bun runtime incompatibility issues in specific environments - #8023: Platform binary selection failure after Bun installation - #7440: Questions about correct platform binary installation - #6994: Windows MCP local server fails with Bun - Related to Bun runtime issues on specific platforms - #9870: Windows dependency resolution issues with cached node_modules Feel free to ignore if none of these address your specific case.
Author
Owner

@TomasHubelbauer commented on GitHub (Jan 30, 2026):

I temporarily fixed this with ln -s "$(which bun)" ~/.bun/bin/node to force using Bun for scripts that require Node in their shebang. But I think OpenCode should run without issues in an environment where only Bun is available, too.

@TomasHubelbauer commented on GitHub (Jan 30, 2026): I temporarily fixed this with `ln -s "$(which bun)" ~/.bun/bin/node` to force using Bun for scripts that require Node in their shebang. But I think OpenCode should run without issues in an environment where only Bun is available, too.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8054