Skip to content

fix: publish JavaScript plugin entrypoint - #8

Merged
IgnisDa merged 2 commits into
IgnisDa:mainfrom
tsukinoko-kun:node-package-entry
Aug 8, 2026
Merged

fix: publish JavaScript plugin entrypoint#8
IgnisDa merged 2 commits into
IgnisDa:mainfrom
tsukinoko-kun:node-package-entry

Conversation

@tsukinoko-kun

@tsukinoko-kun tsukinoko-kun commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

OpenCode GUI uses a Node plugin host, while OpenCode CLI uses Bun.

The package exposed index.ts directly. Node refuses TypeScript stripping for files inside node_modules, causing:

ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING

This prevented the GUI from loading the plugin. CLI continued working because Bun supports TypeScript package entrypoints.

Fix

  • Compile index.ts to dist/index.js
  • Publish the JavaScript entrypoint only
  • Build automatically during npm pack/publish
  • Add a Node package-import smoke test to the publish workflow
  • Bump version to 0.2.3

Verified with OpenCode GUI, package build, npm tarball, and bare Node package import.

Why my earlier attempt failed

I created a bad testing environment that worked around this issue. It was not a new OpenCode GUI update but my bad testing setup. My new testing setup is much closer to how OpenCode GUI actually loads the plugin from npm.

Sorry for the earlier mistake. My earlier attempt was still right but not fully there.

Closes #7

@tsukinoko-kun

Copy link
Copy Markdown
Contributor Author

I can't test the CI change. Please double check yourself before merging.

@IgnisDa

IgnisDa commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Thanks for this!

@IgnisDa
IgnisDa merged commit 2f2bfd6 into IgnisDa:main Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Last OpenCode GUI update broke wakelock again

2 participants