Repository navigation
After upgrading GitHub Copilot CLI to v1.0.46, the CLI is no longer usable in my environment. #3281
Description
Activity
Same here.
Version: v1.0.46/copilot-linux-x64.tar.gz
Environment
OS: Linux (Ubuntu20.04)
Architecture: x64
Node: v22.14.0Same here. Running Copilot on Python anywhere server:
GitHub Copilot CLI 1.0.46
Ubuntu 20.04.4 LTSSame 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.
- addedarea:installationInstalling, updating, versioning, PATH setup, and binary distributionInstalling, updating, versioning, PATH setup, and binary distributionarea:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registryMCP server configuration, discovery, connectivity, OAuth, policy, and registryand removed
on May 13, 2026 Update to prerelease helped me:
/update prereleasein promptReacted by Tim Umbach, NicolasToussaintSt, Abdus Samee, zhen-wang, szstrong and bwieczorek-intUpdate to prerelease helped me:
/update prereleasein promptThank you, that fixed it fore me as well (on a Vertex VM instance)
/update prereleasedid not work for me. Eventually I fully removed the updated new broken versions and forced myself back to 1.0.44 and started it withcopilot --no-auto-updateto 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 trynpm iagain 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
- Located the Copilot package cache at %LOCALAPPDATA%\copilot\pkg\
- Found the error originates from universal\1.0.47\native\runtime\index.js (NAPI-RS auto-generated loader)
- Confirmed the .node file exists (7.5 MB, intact) — the file itself isn't missing
- Loaded the .node file directly with Node.js: require('...runtime.win32-x64-msvc.node') → ERR_DLOPEN_FAILED: The
specified module could not be found - Parsed the PE import table of the .node file — it imports VCRUNTIME140.dll
- 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) - 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):
- Download: https://aka.ms/vs/17/release/vc_redist.x64.exe
- Silent install: vc_redist.x64.exe /install /quiet /norestart
After installation, the native binding loads successfully and Copilot CLI v1.0.47 starts normally.
Recommendation to the Copilot CLI Team
- 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.
- 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.
- 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"
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.
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 iagain 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 iagain after removing both package-lock.json and node_modules directory.Additional context
No response