我在 Windows 7 上安装了“Enide Studio 2014”。然后我创建了一个“Node.js Express Project”。一切顺利,创建了一个新项目。我能够毫无问题地运行它。
由于每次我对代码进行任何更改时停止和启动节点服务器都会在开发过程中进行不必要的努力,因此我希望 Eclipse 能够“监控”更改并相应地重新启动节点。由于 nodeclipse 为此提供了一个选项,因此我尝试将其永久配置为节点监视器。
在Nodeclipse 首选项中,节点路径应设置为“D:\Software\Development\NodeJS\node.exe”。Forever 安装在“D:\Software\Development\NodeJS\node_modules\forever\bin\forever”中,所以我将“节点监视器路径”设置为这样。
在此之后,我无法再次运行该项目。
当我检查控制台输出时,发出(失败)的命令是:
node D:\Software\Development\NodeJS\node_modules\forever\bin\forever D:\calismaalani\nodejs\deneme\app.js
我复制了命令行并自己在命令窗口上发出它并得到:
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
error: Cannot start forever
error: script D:\Software\Development\NodeJS\D:\calismaalani\nodejs\deneme\app.js does not exist.
可以清楚地看到,Nodeclipse 试图将 node_home 路径添加到我的应用程序的绝对路径中。我试图设置一些环境变量,但无法为我的应用程序找到正确的路径。
这里有什么问题?我怎样才能解决这个问题?