VSCode terminal process command failed to launch
Asked Answered
N

2

10

I am trying out the Hello World sample extension. But when I run the extension from the 'Run Extension' task. It gives the following error:

The terminal process command '/bin/zsh -c 'npm run watch'' failed to launch (exit code: 127)

But I am able to run the above command from terminal without any errors.

Novikoff answered 15/1, 2019 at 8:17 Comment(1)
I'm seeing this also, but with /bin/bash (which is my shell). I suspect that the -l flag is supposed to be passed to the shell so that it becomes a "login shell" and loads settings from .profile. The command is coming from the .vscode/tasks.json file where the first task is of type "npm" and script "watch".Despiteful
R
7

Just found this https://github.com/microsoft/vscode/issues/76542 For me in OSX apparently is an issue when opening code from the terminal with code . and can be fixed by checking in settings Terminal>Integrated: Inherit Evn to inherit the environment from VSCode

Ranchero answered 15/11, 2020 at 15:38 Comment(1)
I have inherit env checked, but the issue still persists for me.Botelho
N
2

If macOS and your computer recently restarted on its own (e.g., kernel panic), I found that VScode reloads improperly without loading the environment in all Terminals that were open prior.

The fix is simply to close out of VSCode completely, then relaunch. The environments will then load properly.

Nobody answered 10/1, 2023 at 23:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.