gpt4 book ai didi

node.js - Nodejs 应用程序无法在 Nodeclipse 中运行

转载 作者:IT老高 更新时间:2023-10-28 23:18:05 24 4
gpt4 key购买 nike

我设置了 Nodeclipse 并编写了一个简单的 hello 应用程序。当我尝试作为 Node 应用程序运行时,出现以下错误

Exception occurred executing command line. Cannot run program "node" (in directory "C:\path\to\app"): CreateProcess error=2, The system cannot find the file specified

如果我从 Nodejs 控制台运行,应用程序就会运行。

有没有办法让它在 Nodeclipse 中运行?

最佳答案

我知道这个问题已经有一个月了,但我遇到了同样的错误并设法解决了它。

尝试转到 Window -> Preferences -> Nodeclipse 并取消选中“在 PATH 上查找 Node ...”框。然后确保下面的“Node.js 路径”设置为 node.exe 文件的位置(对我来说是 C:\Program Files (x86)\nodejs\node.exe)。

我不确定为什么会这样(我检查了我的 PATH 并且 nodejs 肯定在其中),但也许它会帮助其他人。

关于node.js - Nodejs 应用程序无法在 Nodeclipse 中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23949819/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com