github / github/copilot-cli

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

オープン
#3,901 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:installation area:platform-windows
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
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_

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、バージョン `1.0.64` の `copilot` を WSL で再現し、エラーで参照されているキャッシュ済みの `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 を短くまとめたダイジェスト。