@opencode-ai/plugin package doesn't work in Node #7493

Closed
opened 2026-02-16 18:07:21 -05:00 by yindo · 2 comments
Owner

Originally created by @alexgleason on GitHub (Jan 24, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

I want to use OpenCode's tool definition in a Node.js project, but this makes the project not runnable in Node:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'node_modules/@opencode-ai/plugin/dist/tool' imported from node_modules/@opencode-ai/plugin/dist/index.js

The issue is that this package does not include .js file extensions on the imports.

Originally created by @alexgleason on GitHub (Jan 24, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description I want to use OpenCode's `tool` definition in a Node.js project, but this makes the project not runnable in Node: Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'node_modules/@opencode-ai/plugin/dist/tool' imported from node_modules/@opencode-ai/plugin/dist/index.js The issue is that this package does not include .js file extensions on the imports.
yindo added the bug label 2026-02-16 18:07:21 -05:00
yindo closed this issue 2026-02-16 18:07:21 -05:00
Author
Owner

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

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

  • #8006: @opencode-ai/plugin: ESM imports missing .js extension breaks plugin loading

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

@github-actions[bot] commented on GitHub (Jan 24, 2026): This issue might be a duplicate of existing issues. Please check: - #8006: @opencode-ai/plugin: ESM imports missing .js extension breaks plugin loading Feel free to ignore if none of these address your specific case.
Author
Owner

@alexgleason commented on GitHub (Jan 24, 2026):

Closing as a duplicate of https://github.com/anomalyco/opencode/issues/8006

@alexgleason commented on GitHub (Jan 24, 2026): Closing as a duplicate of https://github.com/anomalyco/opencode/issues/8006
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7493