Skip to content

@github/copilot-sdk fails on Node 24+ due to vscode-jsonrpc ESM resolution #710

@KnicKnic

Description

@KnicKnic

Note: This issue was generated with AI assistance (GitHub Copilot).

Bug Report

Environment

  • @github/copilot-sdk version: 0.1.29
  • Node.js version: v24.3.0 (also tested on v24.14.0 LTS)
  • OS: Windows 11

Description

@github/copilot-sdk fails to load on Node 24+ with ERR_MODULE_NOT_FOUND. The root cause is that the vscode-jsonrpc dependency uses extensionless ESM import specifiers (e.g., vscode-jsonrpc/node instead of vscode-jsonrpc/node.js), which Node 24's stricter ESM resolver rejects.

The SDK's README states Node.js >= 18.0.0 as a requirement, but it does not work on Node 24+. The CI tests only run against Node 22.

I've filed an upstream issue on vscode-jsonrpc: microsoft/vscode-languageserver-node#1740

Steps to Reproduce

  1. Install Node 24+ (e.g., v24.3.0 or v24.14.0 LTS)
  2. npm install @github/copilot-sdk
  3. Import and use the SDK

Error

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '…/node_modules/vscode-jsonrpc/node' imported from …/node_modules/@github/copilot-sdk/dist/session.js
Did you mean to import "vscode-jsonrpc/node.js"?
    at finalizeResolution (node:internal/modules/esm/resolve:274:11)
    at moduleResolve (node:internal/modules/esm/resolve:859:10)
    at defaultResolve (node:internal/modules/esm/resolve:983:11)

Expected Behavior

The SDK should either:

  1. Work on Node 24+ (by updating vscode-jsonrpc or patching imports)
  2. Document the Node version constraint accurately (e.g., >=18 <24)
  3. Add Node 24 to the CI test matrix to catch this

Workaround

Use Node 22 LTS.

Related

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