0
Fork 0
mirror of https://github.com/obra/superpowers.git synced 2026-09-25 22:09:05 +00:00

Cannot find module '../../lib/skills-core.js' from 'C:\Users\郭红俊\.config\opencode\plugin\superpowers.js' #232

Closed
opened 2026-01-05 08:26:29 +00:00 by ghj1976 · 10 comments
ghj1976 commented 2026-01-05 08:26:29 +00:00 (Migrated from github.com)

win11下opencode安装这个插件后,导致opencode无法启动,用 opencode --log-level DEBUG --print-logs serve 方式启动看日志:

E:\mycode\meerkat> opencode --log-level DEBUG --print-logs serve
INFO 2026-01-05T08:19:53 +212ms service=default version=1.1.2 args=["--log-level","DEBUG","--print-logs","serve"] opencode
INFO 2026-01-05T08:19:53 +1ms service=config path=C:\Users\郭红俊.config\opencode\config.json loading
INFO 2026-01-05T08:19:53 +1ms service=config path=C:\Users\郭红俊.config\opencode\opencode.json loading
INFO 2026-01-05T08:19:53 +1ms service=config path=C:\Users\郭红俊.config\opencode\opencode.jsonc loading
opencode server listening on http://127.0.0.1:4096
INFO 2026-01-05T08:22:10 +137428ms service=server method=GET path=/ request
INFO 2026-01-05T08:22:10 +0ms service=server status=started method=GET path=/ request
INFO 2026-01-05T08:22:10 +0ms service=default directory=E:\mycode\meerkat creating instance
INFO 2026-01-05T08:22:10 +1ms service=project directory=E:\mycode\meerkat fromDirectory
INFO 2026-01-05T08:22:10 +52ms service=default directory=E:\mycode\meerkat bootstrapping
INFO 2026-01-05T08:22:10 +4ms service=bun cmd=["C:\Users\郭红俊\AppData\Roaming\npm\node_modules\opencode-ai\node_modules\opencode-windows-x64\bin\opencode.exe","add","@opencode-ai/plugin@1.1.2","--exact"] cwd=C:\Users\郭红俊.config\opencode running
INFO 2026-01-05T08:22:10 +8ms service=plugin path=file:///C:/Users/%E9%83%AD%E7%BA%A2%E4%BF%8A/.config/opencode/plugin/superpowers.js loading plugin
error: Cannot find module '../../lib/skills-core.js' from 'C:\Users\郭红俊.config\opencode\plugin\superpowers.js'
GET - http://127.0.0.1:4096/ failed
INFO 2026-01-05T08:22:10 +109ms service=server method=GET path=/favicon.ico request
INFO 2026-01-05T08:22:10 +0ms service=server status=started method=GET path=/favicon.ico request
GET - /favicon.ico failed
INFO 2026-01-05T08:22:12 +2070ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)

installed @opencode-ai/plugin@1.1.2

2 packages installed [2.16s]
stderr=Resolving dependencies
Resolved, downloaded and extracted [8]
Saved lockfile
done
INFO 2026-01-05T08:22:12 +0ms service=bun cmd=["C:\Users\郭红俊\AppData\Roaming\npm\node_modules\opencode-ai\node_modules\opencode-windows-x64\bin\opencode.exe","install"] cwd=C:\Users\郭红俊.config\opencode running
INFO 2026-01-05T08:22:12 +19ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)

Checked 3 installs across 4 packages (no changes) [5.00ms]
stderr= done

win11下opencode安装这个插件后,导致opencode无法启动,用 opencode --log-level DEBUG --print-logs serve 方式启动看日志: E:\mycode\meerkat> opencode --log-level DEBUG --print-logs serve INFO 2026-01-05T08:19:53 +212ms service=default version=1.1.2 args=["--log-level","DEBUG","--print-logs","serve"] opencode INFO 2026-01-05T08:19:53 +1ms service=config path=C:\Users\郭红俊\.config\opencode\config.json loading INFO 2026-01-05T08:19:53 +1ms service=config path=C:\Users\郭红俊\.config\opencode\opencode.json loading INFO 2026-01-05T08:19:53 +1ms service=config path=C:\Users\郭红俊\.config\opencode\opencode.jsonc loading opencode server listening on http://127.0.0.1:4096 INFO 2026-01-05T08:22:10 +137428ms service=server method=GET path=/ request INFO 2026-01-05T08:22:10 +0ms service=server status=started method=GET path=/ request INFO 2026-01-05T08:22:10 +0ms service=default directory=E:\mycode\meerkat creating instance INFO 2026-01-05T08:22:10 +1ms service=project directory=E:\mycode\meerkat fromDirectory INFO 2026-01-05T08:22:10 +52ms service=default directory=E:\mycode\meerkat bootstrapping INFO 2026-01-05T08:22:10 +4ms service=bun cmd=["C:\\Users\\郭红俊\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","add","@opencode-ai/plugin@1.1.2","--exact"] cwd=C:\Users\郭红俊\.config\opencode running INFO 2026-01-05T08:22:10 +8ms service=plugin path=file:///C:/Users/%E9%83%AD%E7%BA%A2%E4%BF%8A/.config/opencode/plugin/superpowers.js loading plugin error: Cannot find module '../../lib/skills-core.js' from 'C:\Users\郭红俊\.config\opencode\plugin\superpowers.js' GET - http://127.0.0.1:4096/ failed INFO 2026-01-05T08:22:10 +109ms service=server method=GET path=/favicon.ico request INFO 2026-01-05T08:22:10 +0ms service=server status=started method=GET path=/favicon.ico request GET - /favicon.ico failed INFO 2026-01-05T08:22:12 +2070ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd) installed @opencode-ai/plugin@1.1.2 2 packages installed [2.16s] stderr=Resolving dependencies Resolved, downloaded and extracted [8] Saved lockfile done INFO 2026-01-05T08:22:12 +0ms service=bun cmd=["C:\\Users\\郭红俊\\AppData\\Roaming\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe","install"] cwd=C:\Users\郭红俊\.config\opencode running INFO 2026-01-05T08:22:12 +19ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd) Checked 3 installs across 4 packages (no changes) [5.00ms] stderr= done
ghj1976 commented 2026-01-05 10:09:55 +00:00 (Migrated from github.com)

https://github.com/anomalyco/opencode/issues/6919

经过删除插件确认,superpowers 安装后,会导致opencode无法启动。

启动日志可以看到这条之后就出问题了。

INFO 2026-01-05T10:05:45 +8ms service=plugin path=file:///C:/Users/%E9%83%AD%E7%BA%A2%E4%BF%8A/.config/opencode/plugin/superpowers.js loading plugin

然后界面就:
Image

https://github.com/anomalyco/opencode/issues/6919 经过删除插件确认,superpowers 安装后,会导致opencode无法启动。 启动日志可以看到这条之后就出问题了。 INFO 2026-01-05T10:05:45 +8ms service=plugin path=file:///C:/Users/%E9%83%AD%E7%BA%A2%E4%BF%8A/.config/opencode/plugin/superpowers.js loading plugin 然后界面就: <img width="1814" height="1007" alt="Image" src="https://github.com/user-attachments/assets/9d25ab00-eba1-43de-9dcb-eb09cace8777" />
ghj1976 commented 2026-01-05 10:09:55 +00:00 (Migrated from github.com)

https://github.com/anomalyco/opencode/issues/6919

经过删除插件确认,superpowers 安装后,会导致opencode无法启动。

启动日志可以看到这条之后就出问题了。

INFO 2026-01-05T10:05:45 +8ms service=plugin path=file:///C:/Users/%E9%83%AD%E7%BA%A2%E4%BF%8A/.config/opencode/plugin/superpowers.js loading plugin

然后界面就:
Image

https://github.com/anomalyco/opencode/issues/6919 经过删除插件确认,superpowers 安装后,会导致opencode无法启动。 启动日志可以看到这条之后就出问题了。 INFO 2026-01-05T10:05:45 +8ms service=plugin path=file:///C:/Users/%E9%83%AD%E7%BA%A2%E4%BF%8A/.config/opencode/plugin/superpowers.js loading plugin 然后界面就: <img width="1814" height="1007" alt="Image" src="https://github.com/user-attachments/assets/9d25ab00-eba1-43de-9dcb-eb09cace8777" />
ghj1976 commented 2026-01-05 10:17:17 +00:00 (Migrated from github.com)

~/.config/opencode/superpowers/.opencode/plugin/superpowers.js`

这个文件目录找不到 ../../lib/skills-core.js 文件

这个文件修改下面一行就行可以了:

import * as skillsCore from '../superpowers/lib/skills-core.js';

原先是
import * as skillsCore from '../../lib/skills-core.js';

~/.config/opencode/superpowers/.opencode/plugin/superpowers.js` 这个文件目录找不到 ../../lib/skills-core.js 文件 这个文件修改下面一行就行可以了: import * as skillsCore from '../superpowers/lib/skills-core.js'; 原先是 import * as skillsCore from '../../lib/skills-core.js';
ghj1976 commented 2026-01-05 10:17:17 +00:00 (Migrated from github.com)

~/.config/opencode/superpowers/.opencode/plugin/superpowers.js`

这个文件目录找不到 ../../lib/skills-core.js 文件

这个文件修改下面一行就行可以了:

import * as skillsCore from '../superpowers/lib/skills-core.js';

原先是
import * as skillsCore from '../../lib/skills-core.js';

~/.config/opencode/superpowers/.opencode/plugin/superpowers.js` 这个文件目录找不到 ../../lib/skills-core.js 文件 这个文件修改下面一行就行可以了: import * as skillsCore from '../superpowers/lib/skills-core.js'; 原先是 import * as skillsCore from '../../lib/skills-core.js';
zgldh commented 2026-01-12 15:53:57 +00:00 (Migrated from github.com)

But the opencode can not discover any skills from the superpower.

Image

Have you got this issue?

But the opencode can not discover any skills from the superpower. <img width="1968" height="493" alt="Image" src="https://github.com/user-attachments/assets/2e243efb-f4e0-46f0-b35a-bc57c5d960ea" /> Have you got this issue?
zgldh commented 2026-01-12 15:53:57 +00:00 (Migrated from github.com)

But the opencode can not discover any skills from the superpower.

Image

Have you got this issue?

But the opencode can not discover any skills from the superpower. <img width="1968" height="493" alt="Image" src="https://github.com/user-attachments/assets/2e243efb-f4e0-46f0-b35a-bc57c5d960ea" /> Have you got this issue?
dfhe2004 commented 2026-01-12 23:19:32 +00:00 (Migrated from github.com)

But the opencode can not discover any skills from the superpower.

Image Have you got this issue?
Image
> But the opencode can not discover any skills from the superpower. > > <img alt="Image" width="1968" height="493" src="https://private-user-images.githubusercontent.com/312404/534658352-2e243efb-f4e0-46f0-b35a-bc57c5d960ea.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjgyNjAyMDQsIm5iZiI6MTc2ODI1OTkwNCwicGF0aCI6Ii8zMTI0MDQvNTM0NjU4MzUyLTJlMjQzZWZiLWY0ZTAtNDZmMC1iMzVhLWJjNTdjNWQ5NjBlYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDExMlQyMzE4MjRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNThmODk5YWRmMmUxMjJiM2EwYWI3NDhhN2M4NTkwNjY0NTI3YzM2ZDgwODM5MmNiYTk0MTQ4N2NkOWRiYzcxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.NzAWF7XfTmdYkg3P0iwhnKM4oDXR68GpOye_l70I24Q"> > Have you got this issue? <img width="1072" height="603" alt="Image" src="https://github.com/user-attachments/assets/d2619ebe-8db8-4d5a-ab4a-27808376cfcb" />
dfhe2004 commented 2026-01-12 23:19:32 +00:00 (Migrated from github.com)

But the opencode can not discover any skills from the superpower.

Image Have you got this issue?
Image
> But the opencode can not discover any skills from the superpower. > > <img alt="Image" width="1968" height="493" src="https://private-user-images.githubusercontent.com/312404/534658352-2e243efb-f4e0-46f0-b35a-bc57c5d960ea.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjgyNjAyMDQsIm5iZiI6MTc2ODI1OTkwNCwicGF0aCI6Ii8zMTI0MDQvNTM0NjU4MzUyLTJlMjQzZWZiLWY0ZTAtNDZmMC1iMzVhLWJjNTdjNWQ5NjBlYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMTEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDExMlQyMzE4MjRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNThmODk5YWRmMmUxMjJiM2EwYWI3NDhhN2M4NTkwNjY0NTI3YzM2ZDgwODM5MmNiYTk0MTQ4N2NkOWRiYzcxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.NzAWF7XfTmdYkg3P0iwhnKM4oDXR68GpOye_l70I24Q"> > Have you got this issue? <img width="1072" height="603" alt="Image" src="https://github.com/user-attachments/assets/d2619ebe-8db8-4d5a-ab4a-27808376cfcb" />
obra commented 2026-01-22 18:59:17 +00:00 (Migrated from github.com)

Root Cause Analysis

This is the canonical tracking issue for OpenCode Windows module resolution failures.

Problem

When following the documented installation:

ln -sf ~/.config/opencode/superpowers/.opencode/plugin/superpowers.js ~/.config/opencode/plugin/superpowers.js

On Windows, Git Bash's ln -sf copies the file instead of creating a symlink. This breaks the relative import in the plugin:

import * as skillsCore from '../../lib/skills-core.js';

When the file is copied to ~/.config/opencode/plugin/superpowers.js, the relative path resolves to:

  • ~/.config/lib/skills-core.js ❌

Instead of:

  • ~/.config/opencode/superpowers/lib/skills-core.js ✓

Affected Users

This affects all Windows users installing via the documented instructions.

Duplicates

Potential Solutions

  1. Fix installation docs for Windows - Use mklink /J (directory junction) or clone directly
  2. Use absolute path resolution - Resolve paths based on known install location (loses flexibility)
  3. Detect and handle copied vs symlinked plugin - Check if relative import fails and fall back
  • PR #326 attempts a fix but hardcodes the install path, breaking flexibility
## Root Cause Analysis This is the **canonical tracking issue** for OpenCode Windows module resolution failures. ### Problem When following the documented installation: ```bash ln -sf ~/.config/opencode/superpowers/.opencode/plugin/superpowers.js ~/.config/opencode/plugin/superpowers.js ``` On Windows, Git Bash's `ln -sf` **copies the file** instead of creating a symlink. This breaks the relative import in the plugin: ```javascript import * as skillsCore from '../../lib/skills-core.js'; ``` When the file is copied to `~/.config/opencode/plugin/superpowers.js`, the relative path resolves to: - `~/.config/lib/skills-core.js` ❌ Instead of: - `~/.config/opencode/superpowers/lib/skills-core.js` ✓ ### Affected Users This affects all Windows users installing via the documented instructions. ### Duplicates - #256 - Same issue - #273 - Same issue - #303 - Same issue - #311 - Same issue - #177 - Likely same issue ### Potential Solutions 1. **Fix installation docs for Windows** - Use `mklink /J` (directory junction) or clone directly 2. **Use absolute path resolution** - Resolve paths based on known install location (loses flexibility) 3. **Detect and handle copied vs symlinked plugin** - Check if relative import fails and fall back ### Related PRs - PR #326 attempts a fix but hardcodes the install path, breaking flexibility
obra commented 2026-01-22 20:39:17 +00:00 (Migrated from github.com)

Fixed in PR #330.

The fix:

  1. Removes dependency on skills-core.js (no more relative imports that break when copied)
  2. Adds comprehensive Windows installation docs for cmd.exe, PowerShell, and Git Bash
  3. Uses proper symlinks/junctions for each platform
Fixed in PR #330. The fix: 1. Removes dependency on `skills-core.js` (no more relative imports that break when copied) 2. Adds comprehensive Windows installation docs for cmd.exe, PowerShell, and Git Bash 3. Uses proper symlinks/junctions for each platform
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
skills/obra-superpowers#232
No description provided.