Skip to content

ERR_PACKAGE_PATH_NOT_EXPORTED on Node.js v24 — inconsistent vscode-jsonrpc subpath imports across dist files #891

@JaretRussell

Description

@JaretRussell

Node.js version: v24.13.0 (Active LTS)

SDK version: @github/copilot-sdk@0.1.32

Problem: The SDK's compiled dist files use two different import paths for vscode-jsonrpc:

  • dist/session.js imports vscode-jsonrpc/node (no extension)
  • dist/client.js imports vscode-jsonrpc/node.js (with extension)

Node.js v24's strict ESM resolver requires that subpath imports match exactly what the package's exports map declares. Since vscode-jsonrpc@8.2.1 (the SDK's pinned dependency) has no exports field at all, neither import path works under Node.js v24 strict ESM.

Attempting to override vscode-jsonrpc to 9.0.0-next.11 (which adds "./node" to exports) fixes session.js but breaks client.js since "./node.js" is not in the v9 exports map either.

Expected: Both dist files should use the same import path, and vscode-jsonrpc should be updated to a version with a proper exports map covering that path.

Workaround: Manual postinstall patch to add both "./node" and "./node.js" to vscode-jsonrpc's exports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions