LoginSignup
1
2

More than 5 years have passed since last update.

2018年4月頃に行うELECTRON/VSCodeのデバッグでenv.APPDATAが通らない

Last updated at Posted at 2018-04-11

こうすると

launch.json
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "プログラムの起動",
            "program": "${workspaceFolder}\\index.js",
            "cwd": "${workspaceRoot}",
            "preLaunchTask": null,
            "windows": {
                "runtimeExecutable": "${env.AppData}\\npm\\node_modules\\electron\\dist\\electron.exe"
            },
            "console": "integratedTerminal",
            "sourceMaps": false,
        }
    ]

こうなるよエラー

PATH 上で '${env.AppData}\npm\node_modules\electron\dist\electron.exe' のランタイムが見つかりません。
'${env.AppData}\npm\node_modules\electron\dist\electron.exe' がインストールされていることを確認してください。

こうすると通る

launch.json
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "プログラムの起動",
            "program": "${workspaceFolder}\\index.js",
            "cwd": "${workspaceRoot}",
            "preLaunchTask": null,
            "windows": {
                "runtimeExecutable": "${env:AppData}\\npm\\node_modules\\electron\\dist\\electron.exe"
            },
            "console": "integratedTerminal",
            "sourceMaps": false,
        }
    ]

なにがいけなかったのか

大体の記述が${env.AppData}だった。
いまどきは${env:AppData}らしい。

1
2
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
1
2