opencode icon indicating copy to clipboard operation
opencode copied to clipboard

OpenCode CLI Critical Runtime Failure

Open arnabclir opened this issue 3 days ago • 1 comments

Description

Files:

opencode-installation-issue-report.md opencode-fix-documentation.md Summary: OpenCode v1.1.13 installation appears successful but the tool is completely non-functional due to Bun runtime virtual filesystem (bunfs) incompatibility with PRoot environments.

Key Issues:

UX Issue: Installation script doesn't update current shell PATH (easily worked around with source ~/.bashrc) Critical Bug: Bun's bunfs cannot resolve module paths in PRoot, causing all core commands to fail Error:

Error: Cannot find module '/home/arnab/.cache/opencode/node_modules/opencode-copilot-auth' from '/$bunfs/root/src/index.js' Working Commands: --version, --help, models, debug paths Broken Commands: run, stats, debug config (anything that loads plugins)

Severity: CRITICAL - Tool is completely unusable on this platform

Root Cause: Bun's virtual filesystem (bunfs) is incompatible with PRoot's user-space virtualization layer

Recommended Fixes:

Detect PRoot/container environments and use Node.js runtime instead of Bun Disable bunfs via BUN_DISABLE_BUNFS=1 environment variable Use absolute filesystem paths instead of Bun virtual paths Add platform compatibility warnings at install time Status: No user workaround available - Requires OpenCode team to implement PRoot compatibility

Plugins

No response

OpenCode version

No response

Steps to reproduce

  1. Just installed OpenCode

Screenshot and/or share link

No response

Operating System

proot distro in termux

Terminal

Termux

arnabclir avatar Jan 12 '26 09:01 arnabclir