Skip to content

[Bug]: npm 3.1.9 still ships extensionless ESM imports — please publish PR #499's tsup bundle as 3.1.10 #507

@Skeptomenos

Description

@Skeptomenos

Summary

The latest published npm package @tarquinen/opencode-dcp@3.1.9 fails to load under OpenCode 1.14.x because its dist/ ships extensionless relative imports (e.g. import { getConfig } from "./lib/config"). PR #499 (already merged on main) replaces tsc with tsup and fixes this — but it has not been cut as a release.

This is now blocking everyone on OpenCode 1.14.x (since the ~Apr 1 BunProc → @npmcli/arborist refactor in opencode/#18308, OpenCode's plugin host runs strict Node ESM and can no longer resolve extensionless imports the way Bun did).

Error in OpenCode log

ERROR 2026-05-05T08:35:35 service=plugin path=@tarquinen/opencode-dcp@latest
  target=file:///Users/.../.cache/opencode/packages/@tarquinen/opencode-dcp@latest/node_modules/@tarquinen/opencode-dcp/dist/index.js
  error=Cannot find module '/Users/.../.cache/opencode/packages/@tarquinen/opencode-dcp@latest/node_modules/@tarquinen/opencode-dcp/dist/lib/config'
  imported from /Users/.../dist/index.js
  failed to load plugin

This is the same class of error PR #499 documented and fixed.

Reproduction

npm pack @tarquinen/opencode-dcp@3.1.9
tar -xzf tarquinen-opencode-dcp-3.1.9.tgz
head -3 package/dist/index.js
# import { getConfig } from "./lib/config";       ← extensionless, breaks Node ESM
# import { createCompressMessageTool, ... } from "./lib/compress";
# import { compressDisabledByOpencode, ... } from "./lib/host-permissions";
node -e "import('./package/dist/index.js').then(()=>console.log('ok')).catch(e=>console.error(e.message))"
# Cannot find module '/.../package/dist/lib/config' imported from /.../package/dist/index.js

Why a release matters

  • main HEAD already contains the fix (PR Fix plugin loading error ('fn4 is not a function') via bundling #499 merged 2026-04-12, bf7f3725).
  • package.json on main uses "build": "npm run clean && tsup && tsc --emitDeclarationOnly", but the published 3.1.9 tarball was built with the old tsc-only pipeline.
  • A simple version bump + npm publish should produce a working 3.1.10.

Environment

  • OpenCode: 1.14.37 (Electron 41 / Node 24, macOS arm64)
  • Plugin: @tarquinen/opencode-dcp@3.1.9 from npm (current latest)
  • macOS 26.4.1 arm64
  • Affects every project that lists this plugin (logs show repeated failures on every OpenCode startup, one per project workspace).

Suggested

  1. Bump version to 3.1.10.
  2. Publish — PR Fix plugin loading error ('fn4 is not a function') via bundling #499's bundling should auto-resolve the imports during tsup.
  3. (Optional) Add a postpublish smoke test: node -e "import(require.resolve('@tarquinen/opencode-dcp'))" to catch this regression in CI.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions