我正在使用NSSM来创建节点进程 . 我有一个简单的脚本,侦听发送到MSMQ队列的消息,该队列使用node-msmq https://www.npmjs.com/package/node-msmq

const msmq = require('node-msmq');
const  fs = require('fs');

var queue = msmq.openOrCreateQueue('.\\private$\\testqueue');

// Set receive listener callback
queue.on('receive', (msg) => {
  console.log(msg.body);
  fs.writeFileSync("C:\\tmp\\test.xml", msg.body); 
}
console.log('listening for messages..');
// Start receiving messages from the queue
queue.startReceiving();

通过命令行运行时,这可以正常工作 . 我可以将其创建为服务但是尽快尝试启动NSSM创建的服务,我从服务cpl获得以下弹出警报但没有应用程序错误 .

windows could not start the service on local computer... the service did not return an error谁能告诉我这个问题是什么?