issues starting any app or the web interface: command hangs and exception found in log
kilnan opened this issue · 1 comments
Just as the title states, if I try
pod start myapp
or
pod web start
the command hangs, and in pm2.log I find this
2018-01-05 13:02:33: [PM2] Error caught by domain:
TypeError: "listener" argument must be a function
at ChildProcess.removeListener (events.js:360:15)
at workAround (/usr/lib/node_modules/pod/node_modules/pm2/lib/God.js:130:20)
at nodeApp (/usr/lib/node_modules/pod/node_modules/pm2/lib/God.js:159:7)
at Object.nodeApp (/usr/lib/node_modules/pod/node_modules/pm2/lib/God/ClusterMode.js:78:12)
at Object.executeApp (/usr/lib/node_modules/pod/node_modules/pm2/lib/God.js:145:9)
at ex (/usr/lib/node_modules/pod/node_modules/pm2/lib/God.js:361:18)
at prepare (/usr/lib/node_modules/pod/node_modules/pm2/lib/God.js:367:7)
at Server.onmessage (/usr/lib/node_modules/pod/node_modules/pm2-axon-rpc/lib/server.js:105:6)
at emitTwo (events.js:125:13)
at RepSocket.emit (events.js:213:7)
pm2 version: 0.12.16
pod version: 0.9.0
node version: 8.7.0
npm version: 4.6.1
The problem here seems to be an old pm2 peer dependency. Luckily, it was solved and merged in this pull request before 0.9.1
version bump.
However on npm
the latest version available is 0.9.0
(as of writting this comment). You have to install from github
instead of npm
if you want 0.9.1
.
This is as simple as replacing pod
with git+https://github.com/yyx990803/pod.git
in you npm install
or yarn add
command.
Your dependencies should now look like this. (And your error would be no more, hopefully!)
npm ls -depth 0 -g
├── npm@5.5.1
├── pm2@2.7.2
└── pod@0.9.1 (git+https://github.com/yyx990803/pod.git#97a546c2c632466898947a6ad3480ce6e7e4f99e)