【问题标题】:VSCode Terminal: The term 'node' is not recognized as the name of a cmdletVSCode 终端:术语“节点”未被识别为 cmdlet 的名称
【发布时间】:2021-11-24 11:39:25
【问题描述】:

问题是我实际上可以通过 Windows CMD 访问 C:\Program Files\nodejs\node.exe,例如:node -v:

C:\Users\User>node -v
v16.13.0

但 Visual Studio Code(安装了 node.js 扩展包)无法识别终端中的节点。我所能找到的就是:

  1. 我应该在我的 PATH 变量中包含 nodejs 文件夹(已经完成)并且
  2. 重启我的电脑
  3. 重启 IDE。
  • 所有三个步骤都已完成,但 VSCode 仍然无法识别终端中的“node”命令。
node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the 
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1 

【问题讨论】:

    标签: node.js windows visual-studio-code cmd


    【解决方案1】:

    现在一切正常,我只需要通过 VSCode -> Terminal -> New Terminal 手动关闭并重新打开终端,同时按下终端面板上的“Powershell”按钮即可解决问题。

    【讨论】:

      猜你喜欢
      • 2021-10-06
      • 2019-10-12
      • 2017-12-11
      • 2021-12-09
      • 2020-02-25
      • 2020-04-17
      • 2018-09-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多