0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【WSL2】Cursor が立ち上げられなくなった

Posted at

前提条件

WSL2 上で cursor コマンドで Cursor を立ち上げられるようにしています。

遭遇した事象

いつもと変わらず cursor コマンドを叩くと、下記のようなエラーが発生し、Cursor が立ち上げられなくなってしまいました。

wsl2
node:internal/modules/cjs/loader:1235
  throw err;
  ^

Error: Cannot find module 'C:\Users\***\AppData\Local\Programs\cursor\resources\app\out\cli.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1232:15)
    at Module._load (node:internal/modules/cjs/loader:1058:27)
    at c._load (node:electron/js2c/node_init:2:16955)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:188:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.18.1

調査

エラー内容を見るに、Cursor を立ち上げるためのモジュールが足りていないとのことです。
ただ、該当のモジュールをどのようにリインストールするかは分かりませんでした。

解決策

大人しく、Cursor をリインストールすることにしました。

コマンドプロンプト
# 既存の Cursor をアンインストール
winget uninstall Cursor

# 再インストール
winget install Cursor

上記の手順で、無事立ち上がるようになりました。

まとめ

エラーの発生原因については謎ですが、立ち上がるようにはなったのでよしとします。
同様のエラーに遭遇した方の参考になれば幸いです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?