superpowers icon indicating copy to clipboard operation
superpowers copied to clipboard

opencode can't start after install superpowers in win11

Open wxzhuhua opened this issue 10 months ago • 14 comments

Describe the bug Running opencode only show blank screen after superpowers being installed

To Reproduce Steps to reproduce the behavior:

  1. install opencode by git bash in win11, opencode can start
  2. install oh-my-opencode, opencode can start
  3. install superpowers ( tell the gemini 3.0 pro model to "Fetch and follow instructions from https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.opencode/INSTALL.md")
  4. can't start opencode.

Expected behavior opencode start as normal

Logs there's no log/

Additional context nothing

wxzhuhua avatar Jan 13 '26 02:01 wxzhuhua

I have met the same issue, I have to remove the superpowers and reinstall the opencode.

LeeMeo avatar Jan 13 '26 05:01 LeeMeo

Me too, my system is Windows 10.

ageovb avatar Jan 13 '26 05:01 ageovb

@LeeMeo @wxzhuhua On Windows, ~\.config\opencode\plugin\superpowers.js is not created as a symbolic link,

Open cmd as administrator and run the following command: mklink %USERPROFILE%\.config\opencode\plugin\superpowers.js %USERPROFILE%\.config\opencode\superpowers\.opencode\plugin\superpowers.js

ageovb avatar Jan 13 '26 06:01 ageovb

Image Image @ageovb 你的方法是有效的。

BingWuJ avatar Jan 13 '26 17:01 BingWuJ

npm uninstall opencode-ai

rm -rf ~/.config/opencode/plugin
rm -rf ~/.config/opencode/superpowers
rm -rf C:\Users\live1.local\share\opencode
rm -rf C:\Users\live1.cache\opencode
npm install opencode-ai@latest

mkdir -p C:\Users\live1.config\opencode\plugin
git clone https://github.com/obra/superpowers.git C:\Users\live1.config\opencode\superpowers
New-Item -ItemType SymbolicLink -Target C:\Users\live1.config\opencode\superpowers.opencode\plugin\superpowers.js -Path ~/.config/opencode/plugin/superpowers.js

It s OK!

barhma avatar Jan 14 '26 10:01 barhma

No need administrator

$O="$env:USERPROFILE\.config\opencode";if(Test-Path $O){Remove-Item $O -Recurse -Force};mkdir "$O\plugin"|Out-Null;git clone https://github.com/obra/superpowers.git "$O\superpowers";cmd /c mklink /J "$O\plugin\superpowers.js" "$O\superpowers\.opencode\plugin\superpowers.js"
Image

LilThawg29 avatar Jan 14 '26 16:01 LilThawg29

@LilThawg29 works for me, thanks

RebornRefly avatar Jan 15 '26 01:01 RebornRefly

https://chatgpt.com/share/69686714-8f94-8011-90c5-edc2875cd5df

z7-btc avatar Jan 15 '26 04:01 z7-btc

i still can't start opencode after i restart my fixed opencode,why?

thbor avatar Jan 15 '26 07:01 thbor

I followed the suggestions from @barhma with a few adjustments for Windows. The manual installation (instructions here) works fine:

1. Clean up and reinstall:

PowerShell

npm uninstall opencode-ai
Remove-Item -Recurse -Force "$HOME\.config\opencode\plugin", "$HOME\.config\opencode\superpowers", "$HOME\.local\share\opencode", "$HOME\.cache\opencode"
npm install opencode-ai@latest

2. Manual Installation:

PowerShell

Create directory and clone repo

New-Item -ItemType Directory -Force -Path "$HOME\.config\opencode\plugin"
git clone https://github.com/obra/superpowers.git "$HOME\.config\opencode\superpowers"

Create Symbolic Link

New-Item -ItemType SymbolicLink -Path "$HOME\.config\opencode\plugin\superpowers

lLimaAlves avatar Jan 15 '26 18:01 lLimaAlves

There seems to be a shared root cause across the Windows reports here and in #260 / #273.

In these cases, opencode appears to start with a missing or unresolved plugin entrypoint at: ~/.config/opencode/plugin/superpowers.js

Multiple users have confirmed that manually creating a symlink or junction to: superpowers/.opencode/plugin/superpowers.js immediately restores normal startup, which suggests that opencode’s plugin loader assumes this path exists as an invariant.

On Windows, creation of this link can fail or be skipped depending on environment (shell, permissions, dev mode), leaving opencode to attempt a require() on a missing file during early startup. Because this happens before logging initializes, the failure manifests as a blank screen with no logs.

The reinstall / mklink / junction-based fixes work because they restore this invariant, not because reinstall itself resolves the issue.

A systemic mitigation could be one of:

  • explicit post-install verification that the plugin entrypoint exists
  • a Windows-specific fallback (junction or copy) if link creation is unavailable
  • or a startup guard that surfaces a clear error when the plugin entrypoint is missing

ishwar170695 avatar Jan 17 '26 17:01 ishwar170695

Please remember to install the necessary dependency by running the following command in your terminal:

npm install @opencode-ai/plugin

This should be done in the directory located at ~/.config/opencode.

For more information, refer to this: https://github.com/obra/superpowers/pull/305

freewebtopdf avatar Jan 20 '26 01:01 freewebtopdf

No need administrator无需管理员

$O="$env:USERPROFILE\.config\opencode";if(Test-Path $O){Remove-Item $O -Recurse -Force};mkdir "$O\plugin"|Out-Null;git clone https://github.com/obra/superpowers.git "$O\superpowers";cmd /c mklink /J "$O\plugin\superpowers.js" "$O\superpowers\.opencode\plugin\superpowers.js"
Image

it works

maoshaoye avatar Jan 20 '26 05:01 maoshaoye

Closing as duplicate of #232 which is the canonical tracking issue for OpenCode Windows module resolution failures. See #232 for root cause analysis and potential solutions.

obra avatar Jan 22 '26 19:01 obra