本文介绍了Node.js:“访问被拒绝"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在 VS Code 中制作一个简单的 node.js 应用程序.我要做的就是:
I'm trying to make a simple node.js app in VS Code.All im trying to do is:
const name = "Tom";
console.log("Hello " + name);
当我运行代码时,我收到错误:Program 'node.exe' failed to run: Access is denied
.当我尝试在 windows cmd 中使用 node -v
来检查 Node 是否安装时,它还显示访问被拒绝".我该如何解决这个问题?
When I run the code, I get the error: Program 'node.exe' failed to run: Access is denied
.When I try to check Node is installed with node -v
in windows cmd, it also says "Access is denied".How do I fix this issue?
推荐答案
您没有足够的权限在CMD中执行节点命令,解决这个问题
You don't have enough permission to execute node commands in CMD, to solve this
以管理员身份运行 CMD
这篇关于Node.js:“访问被拒绝"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!