如果在c:的根目录中键入dir /x
,则可以看到目录的short name。
因此,请尝试以下操作:
C:\PROGRA~1\nodejs\node.exe
,
永久安装1.0.0版可以为我解决问题
,
我对forever 2.0.0有同样的问题。
我在“forever.js”中使用了一种解决方法:(我通过“node ever.js”启动我的应用程序)
const configChild = {
//
// Basic configuration options
//
silent: true,// Silences the output from stdout and stderr in the parent process
'killTree': true,// Kills the entire child process tree on `exit`
....
}
// =======================================================
// **Workaround for Windows**
// =======================================================
if (process.platform === 'win32' && process.execPath == "C:\\Program Files\\nodejs\\node.exe") {
configChild.command = '"C:\\PROGRA~1\\nodejs\\node.exe"';
}
const child = new (forever.Monitor)('app.js',configChild);
....
child.start();
本文链接:https://www.f2er.com/2780288.html