93
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

code.コマンドがcommand not found となる

Posted at

#前提
macOS
Visual Studio Code, Node.jsがインストール済

#やりたいこと
Visual Studio Codeでファイルを開くコマンドの実行

code .

#問題
コマンドが存在しないエラー

-bash: code: command not found

#解決
Visual Studio Codeを起動
コマンドパレットを開く(cmd+shift+p)
"Shell Command: Install 'code' command in PATH"を選択

#結果
成功した場合、ポップアップで完了通知が表示される
(Shell command 'code' successfully installed in PATH.)
ターミナル再起動の必要はなく、そのまま「code .」コマンドが使用可能になる

93
28
2

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
93
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?