我正在尝试使用 pm2 启动一个 Sails 应用程序,但出现以下错误:
pm2 start app.js --name myapp -i 2
pm2 logs
[myapp-1 (out) 2014-05-25T13:38:51] info: Sails <|
[myapp-1 (out) 2014-05-25T13:38:51] info: v0.10.0-rc7 |\
[myapp-1 (out) 2014-05-25T13:38:51] info: /|.\
[myapp-1 (out) 2014-05-25T13:38:51] info: / || \
[myapp-1 (out) 2014-05-25T13:38:51] info: ,' |' \
[myapp-1 (out) 2014-05-25T13:38:51] info: .-'.-==|/_--'
[myapp-1 (out) 2014-05-25T13:38:51]
[myapp-1 (err) 2014-05-25T13:38:51] debug: Environment : development
[myapp-1 (err) 2014-05-25T13:38:51] debug: Port : 1338
[myapp-1 (err) 2014-05-25T13:38:51] debug: --------------------------------------------------------
[myapp-1 (err) 2014-05-25T13:38:51] TypeError: Object #<Object> has no method 'addAsyncListener'
[myapp-1 (err) 2014-05-25T13:38:51] at Server._listen2 (net.js:1095:18)
[myapp-1 (err) 2014-05-25T13:38:51] at cb (net.js:1139:10)
[myapp-1 (err) 2014-05-25T13:38:51] at rr (cluster.js:552:5)
[myapp-1 (err) 2014-05-25T13:38:51] at Worker.<anonymous> (cluster.js:484:9)
[myapp-1 (err) 2014-05-25T13:38:51] at process.<anonymous> (cluster.js:611:8)
[myapp-1 (err) 2014-05-25T13:38:51] at process.EventEmitter.emit (events.js:123:20)
[myapp-1 (err) 2014-05-25T13:38:51] at handleMessage (child_process.js:318:10)
[myapp-1 (err) 2014-05-25T13:38:51] at Pipe.channel.onread (child_process.js:346:11)
Sails 版本:0.10.0-rc7
pm2 版本:0.8.6
另外,我不知道如何设置环境和端口。我试过了,--node-args="--prod"
但没有效果。
我一直在尝试使用模块并且工作正常。
有谁知道我该如何解决这个问题?
谢谢
编辑
显然是 node.js 版本的问题。
我做了一些测试,并在 pm2 存储库中报告了问题:https ://github.com/Unitech/pm2/issues/491 。
有什么消息我会在这里更新。