Skip to content

fix(deps): add missing @connectrpc/connect-node for @cursor/sdk#31

Merged
justin-carper merged 1 commit into
mainfrom
fix-connectrpc-dependency
Jun 17, 2026
Merged

fix(deps): add missing @connectrpc/connect-node for @cursor/sdk#31
justin-carper merged 1 commit into
mainfrom
fix-connectrpc-dependency

Conversation

@justin-carper

Copy link
Copy Markdown
Collaborator

Problem

Plugin fails to load with:

Cannot find package '@connectrpc/connect-node' imported from .../@cursor/sdk/dist/esm/index.js

@cursor/sdk@1.0.19 imports @connectrpc/connect-node at runtime (Http2SessionManager, createNodeHttpClient, compressionGzip) but only declares @connectrpc/connect and @connectrpc/connect-web in its dependencies — an upstream packaging bug. Node throws ERR_MODULE_NOT_FOUND on import.

Fix

Add @connectrpc/connect-node as a direct dependency so the import resolves.

  • Pinned to ^1.6.1 (resolves to 1.7.0, the highest v1).
  • Not v2.x: the SDK bundles @connectrpc/connect@1.6.1, and connect-node v2.x targets the connect v2.x API. v1 is required for compatibility.

Verification

  • npm run typecheck — clean
  • npm test — 181/181 pass
  • npm run build — success
  • import('@cursor/sdk') resolves cleanly

@cursor/sdk@1.0.19 imports @connectrpc/connect-node at runtime
(Http2SessionManager, createNodeHttpClient, compressionGzip) but only
declares @connectrpc/connect and @connectrpc/connect-web in its deps,
causing ERR_MODULE_NOT_FOUND on plugin load.

Add @connectrpc/connect-node@^1.6.1 to dependencies. Pinned to v1 since
the SDK bundles @connectrpc/connect@1.6.1; connect-node v2.x targets the
connect v2.x API. Resolves to 1.7.0.
@justin-carper justin-carper merged commit 2ff0b45 into main Jun 17, 2026
5 of 6 checks passed
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.

1 participant