Skip to content

After upgrading GitHub Copilot CLI to v1.0.46, the CLI is no longer usable in my environment. #3281

Description

@softwarezhen

Describe the bug

It starts, prints the normal startup banner, but then immediately reports:

✗ Failed to start MCP Servers: Error: Cannot find native binding. npm has a bug related to optional dependencies (npm/cli#4828). Please try npm i again after removing both package-lock.json and node_modules directory.

Affected version

GitHub Copilot CLI 1.0.46.

Steps to reproduce the behavior

Version
GitHub Copilot CLI: 1.0.46
Previous version that worked: older versions / JS entry path still works in my environment
Installed globally with npm

Environment
OS: Linux
Architecture: x64
Node: v24.14.0
npm: installed globally with Node 24
glibc on system is relatively old

Expected behavior

✗ Failed to start MCP Servers: Error: Cannot find native binding. npm has a bug related to optional dependencies (npm/cli#4828). Please try npm i again after removing both package-lock.json and node_modules directory.

Additional context

No response

Activity

  1. added theissue type on May 13, 2026
  2. plt12138 commented on May 13, 2026

    @plt12138

    Same here.

    Version: v1.0.46/copilot-linux-x64.tar.gz
    Environment
    OS: Linux (Ubuntu20.04)
    Architecture: x64
    Node: v22.14.0

  3. atariq6298 commented on May 13, 2026

    @atariq6298

    Same here. Running Copilot on Python anywhere server:
    GitHub Copilot CLI 1.0.46
    Ubuntu 20.04.4 LTS

  4. ansjkarlsso commented on May 13, 2026

    @ansjkarlsso

    Same here on Rocky Linux using pre-packaged binary https://github.com/github/copilot-cli/releases/download/v1.0.46/copilot-linux-x64.tar.gz

    EDIT: I got it working by removing ~/.cache/copilot/pkg. Just removing ~/.copilot or using old binaries did not work.

  5. added
    area:installationInstalling, updating, versioning, PATH setup, and binary distribution
    area:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registry
    and removed on May 13, 2026
  6. pawelorszulik7 commented on May 13, 2026

    @pawelorszulik7

    Update to prerelease helped me: /update prerelease in prompt

  7. timumbach-bp commented on May 13, 2026

    @timumbach-bp

    Update to prerelease helped me: /update prerelease in prompt

    Thank you, that fixed it fore me as well (on a Vertex VM instance)

  8. MattVevang commented on May 13, 2026

    @MattVevang

    /update prerelease did not work for me. Eventually I fully removed the updated new broken versions and forced myself back to 1.0.44 and started it with copilot --no-auto-update to prevent auto upgrade and lock out from being possible. I then used the copilot cli to self diagnose its issue and it provided me this output from my diagnosis report text. I am hopeful this is of use to others or maybe the copilot cli folks recognize part of this and it helps corroborate the problem so a solution is made correctly? (The I below is copilot speaking for its self that is not me 😄 .


    Issue: GitHub Copilot CLI v1.0.47+ fails on Windows with "Cannot find native binding" error

    Environment

    • Windows 11 (x64)
    • GitHub Copilot CLI v1.0.47
    • No Microsoft Visual C++ Redistributable installed system-wide

    Symptoms

    ✗ Execution failed: Error: Cannot find native binding. npm has a bug related to optional dependencies
    (npm/cli#4828). Please try npm i again after removing both package-lock.json and
    node_modules directory.

    The CLI starts (banner displays), loads MCP servers, then crashes before becoming interactive. Rolling back to
    v1.0.44 with --no-auto-update is the only workaround.

    Root Cause

    Between v1.0.44 and v1.0.47, the native runtime module was changed from koffi (which ships prebuilt binaries for all platforms in a single self-contained directory) to a NAPI-RS based module (@copilot/runtime-native) compiled with MSVC.

    The new native binding at:

    %LOCALAPPDATA%\copilot\pkg\universal\1.0.47\native\runtime\runtime.win32-x64-msvc.node

    imports VCRUNTIME140.dll (from the Microsoft Visual C++ 2015-2022 Redistributable). On systems where this redistributable is not installed, Windows reports "The specified module could not be found" (ERR_DLOPEN_FAILED) when Node.js tries to dlopen() the .node file.

    The error message shown to users ("npm has a bug related to optional dependencies") is misleading — it's the generic NAPI-RS fallback error and has nothing to do with npm. The actual failure is a missing system DLL dependency.

    How I Diagnosed It

    1. Located the Copilot package cache at %LOCALAPPDATA%\copilot\pkg\
    2. Found the error originates from universal\1.0.47\native\runtime\index.js (NAPI-RS auto-generated loader)
    3. Confirmed the .node file exists (7.5 MB, intact) — the file itself isn't missing
    4. Loaded the .node file directly with Node.js: require('...runtime.win32-x64-msvc.node') → ERR_DLOPEN_FAILED: The
      specified module could not be found
    5. Parsed the PE import table of the .node file — it imports VCRUNTIME140.dll
    6. Confirmed C:\Windows\System32\VCRUNTIME140.dll did not exist (only copies bundled inside Edge WebView and Azure
      CLI subdirectories, which aren't on the DLL search path)
    7. Compared with v1.0.44 which uses koffi (pure FFI, no MSVC dependency) — explaining why the older version works

    Solution

    Install the Microsoft Visual C++ 2015-2022 Redistributable (x64):

    After installation, the native binding loads successfully and Copilot CLI v1.0.47 starts normally.

    Recommendation to the Copilot CLI Team

    1. Bundle VCRUNTIME140.dll alongside the .node file (or statically link with /MT instead of /MD). The previous koffi-based approach was fully self-contained and didn't require system-level dependencies. The NAPI-RS migration introduced an implicit system dependency that many Windows machines (especially fresh installs, VMs, containers, and CI runners) won't have.
    2. Improve the error message. The current "npm has a bug related to optional dependencies" message is the generic NAPI-RS boilerplate and is completely unhelpful for end users of a standalone CLI tool. The loadErrors array contains the real error (ERR_DLOPEN_FAILED: The specified module could not be found) — surfacing that would point users toward the actual fix.
    3. Add a preflight check. Before attempting to load native bindings, check for the presence of VCRUNTIME140.dll and emit a clear message like: "Missing Microsoft Visual C++ Redistributable. Install from https://aka.ms/vs/17/release/vc_redist.x64.exe"

  9. copilot-cli-bot commented on Sep 29, 2026

    @copilot-cli-bot

    This appears to be resolved as of GitHub Copilot CLI v1.0.89. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:installationInstalling, updating, versioning, PATH setup, and binary distributionarea:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registry

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions