Reputation: 31
VSCode integrated terminal keeps giving me "command not found" errors even though running the same command in Terminal app works.
Fortunately, git commands work in the VSCode integrated terminal, but not "npm run start:dev" or "brew-v" etc
I get the "command no found" error in the VSCode integrated terminal when I type something like brew -v
:
enter image description here
I'm also using Pop OS on a Linux machine if that makes any difference. When I type echo $SHELL
I updated my default terminal to be the same as my Terminal app, as well. But I think it has something to do with default integrated terminal settings not configured / set up properly to look in the right path.
Upvotes: 0
Views: 1759
Reputation: 31
I've had the same issue of some commands not recognized by integrated terminal in VSCodium (Flatpak) on Linux Mint. Try adding the below key-value pairs to your settings.json (Manage > Settings > Open Settings (JSON))
{
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.env.linux": {
"PATH": "/run/host/bin:/run/host/usr/bin"
}
}
Path Format:
'/run/host/' + '/some/path/to/somewhere'
Paths are separated by ':'
You may want to run echo $PATH
in your external (built-in) terminal to explore the PATHs set.
Upvotes: 0
Reputation: 9
Try to verify the PATH variable, Opening a new integrated terminal in VSCode and running the command echo $PATH
. Then compare the output with the PATH variable in your Terminal app by running the same command there echo $PATH
, and then check if there are any differences.
Upvotes: 0