github / github/copilot-cli

Copilot cannot launch from WSL after upgrading to `1.0.64` from PowerShell

未关闭
#3,901 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:installation area:platform-windows
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the bug

I use GitHub Copilot in both Windows (from PowerShell) and WSL.

This morning I updated the Windows installation to `1.0.64`. The Windows version is working fine after the update.

However, the WSL installation cannot launch. The error message is

```bash
$ copilot
Failed to load package index: /home/shengjiema/.cache/copilot/pkg/linux-x64/1.0.64-1/index.js SyntaxError: Invalid or unexpected token
at compileSourceTextModule (node:internal/modules/esm/utils:318:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:90:18)
at #translate (node:internal/modules/esm/loader:435:20)
at afterLoad (node:internal/modules/esm/loader:491:29)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:496:12)
at #getOrCreateModuleJobAfterResolve (node:internal/modules/esm/loader:549:36)
at afterResolve (node:internal/modules/esm/loader:597:52)
at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:603:12)
at node:internal/modules/esm/loader:622:32
at TracingChannel.tracePromise (node:diagnostics_channel:362:14)
```

### Affected version

`copilot --version` does not work in WSL, but the Windows installation says `GitHub Copilot CLI 1.0.64.`

### Steps to reproduce the behavior

_No response_

### Expected behavior

_No response_

### Additional context

_No response_

贡献指南

打开贡献指南

调研方向

首先,在 WSL 中使用版本 `1.0.64` 重现 `copilot`,并检查错误中引用的缓存文件 `linux-x64/1.0.64-1/index.js`。将 WSL 的行为与正常工作的 PowerShell 安装进行比较;完成标准是 `copilot` 能在 WSL 中启动,并且 `copilot --version` 能正常工作。

由索引模型根据 Issue 内容生成。

评估

技术栈
node.js, powershell, shell
领域
cli, operating-systems
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。