术语“节点"未被识别为 cmdlet、函数、脚本文件或可运行程序的名称 [英] The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program

查看:47
本文介绍了术语“节点"未被识别为 cmdlet、函数、脚本文件或可运行程序的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 VS Code 终端中运行 node 时遇到此错误,此外我尝试在 CMD 中运行相同的东西并且它在那里工作但在 VS Code 终端中不起作用:

I'm getting this error while running node in my VS Code terminal besides I tried to run the same thing in CMD and it worked there but not in VS Code terminal:

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
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (node:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

推荐答案

尝试关闭然后重新打开 VS Code.

Try closing and then reopening VS Code.

如果您在 VS Code 打开时安装了 node,则对 PATH 的更改尚不可见.(确保在安装节点时选择了添加到 PATH 选项...如果不确定,请确保将其添加到 PATH)

If you have installed node while VS Code was opened then the change to the PATH won't be visible yet. (be sure that the add to PATH option is selected while installing node...if not be sure to add it to the PATH)

这篇关于术语“节点"未被识别为 cmdlet、函数、脚本文件或可运行程序的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆