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?

More than 3 years have passed since last update.

can't find node.js binary "deno": path does not exist.

Posted at

VSCodeで can't find node.js binary "deno": path does not exist. エラー対処

image.png
全文

can't find node.js binary "deno": path does not exist. Make sure Node.js is installed and in your PATH, or set the "runtimeExecutable" in your launch.json

発生した問題

denoをインストールしてdeno -Vでバージョンが返ってくるのに"runtimeExecutable": "deno"でPATHがないと怒られる。

環境

os: windows 11
version: 21H2

手続き

一応インストール済みか確認する

deno -V
> deno 1.18.2

denoがどこにインストールされているのかを確認する

where.exe deno
> C:\Users\<ユーザー名>\.deno\bin\deno.exe

vscodeに戻ってlaunch.jsonを開く

launch.json
{
    "version": "0.2.0",
    "configurations": [
        {
            "request": "launch",
            "name": "main.ts",
            "type": "pwa-node",
            "program": "${workspaceFolder}/main.ts",
            "cwd": "${workspaceFolder}",
            //先ほど確認したパスに'\'を増やして記述
            "runtimeExecutable": "C:\\Users\\<ユーザ名>\\.deno\\bin\\deno.exe",
            "runtimeArgs": [
                "run",
                "--inspect",
                "--allow-read",
                "--allow-net"
            ],
            "attachSimplePort": 9229
        }
    ]
}

これで治りました。

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?