While troubleshooting a plugin loading failure (oh-my-openagent), I discovered that the 'opencode plugin install' command creates a nested structure in '/.cache/opencode/packages/@latest/node_modules//'. However, the plugin loader (service=plugin) seems to expect the entry point at '/.cache/opencode/packages/@latest/node_modules/package.json'.
This results in the following error:
'ERROR service=plugin path=oh-my-openagent@latest error=ENOENT: no such file or directory, open /home/user/.cache/opencode/packages/oh-my-openagent@latest/node_modules/package.json failed to resolve plugin server entry'
Manual fix involves symlinking the nested package.json to the root of node_modules. Additionally, it appears that the REAL active plugins are resolved from '~/.cache/opencode/node_modules/', leading to confusion when 'opencode plugin install' creates a separate 'packages/' directory that is then partially ignored or incorrectly resolved by the runtime.
Tested on opencode v1.14.18.
While troubleshooting a plugin loading failure (oh-my-openagent), I discovered that the 'opencode plugin install' command creates a nested structure in '
/.cache/opencode/packages/@latest/node_modules//'. However, the plugin loader (service=plugin) seems to expect the entry point at '/.cache/opencode/packages/@latest/node_modules/package.json'.This results in the following error:
'ERROR service=plugin path=oh-my-openagent@latest error=ENOENT: no such file or directory, open /home/user/.cache/opencode/packages/oh-my-openagent@latest/node_modules/package.json failed to resolve plugin server entry'
Manual fix involves symlinking the nested package.json to the root of node_modules. Additionally, it appears that the REAL active plugins are resolved from '~/.cache/opencode/node_modules/', leading to confusion when 'opencode plugin install' creates a separate 'packages/' directory that is then partially ignored or incorrectly resolved by the runtime.
Tested on opencode v1.14.18.