简体   繁体   English

无法在 VS Code 终端中更改节点版本

[英]Cannot change node version in VS Code terminal

I'm working on Mac and I cannot change node version from terminal window in VS Code我正在使用 Mac,我无法在 VS Code 中从终端 window 更改节点版本在此处输入图像描述

What's interesting, when I open iTerm I have no problems with switching versions.有趣的是,当我打开 iTerm 时,切换版本没有任何问题。 So the problem only seems to appear on VS Code.所以问题似乎只出现在 VS Code 上。

Any idea why and how to solve it?知道为什么以及如何解决它吗?

vscode has a shell integration , which you can configure . vscode有一个shell集成,可以配置 eg placing the following configuration in your vscode settings例如,将以下配置放在您的 vscode 设置中

"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe"

or you can use the shell launcher plugin, which supports launch multiple shell configurations in the terminal.或者您可以使用shell 启动器插件,该插件支持在终端中启动多个 shell 配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM