foreversd/forever

forever stopall not working with node 10

Closed this issue · 2 comments

Working on updating services from nodev6.11.2 to 10.14.1. Implement the forever to start and stop all services in one go.
After updating node v10.14.1, forever stopAll and list is not working. Throwing following error:

fs.js:137
throw new ERR_INVALID_CALLBACK();
^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at makeCallback (fs.js:137:11)
at Object.unlink (fs.js:936:14)
at exports.NsSocket. (xyz\node_modules\forever\lib\forever\worker.js:96:12)
at exports.NsSocket.EventEmitter.emit (xyz\node_modules\eventemitter2\lib\eventemitter2.js:339:22)
at exports.NsSocket._onData (xyz\node_modules\nssocket\lib\nssocket.js:456:8)
at Lazy. (xyz\node_modules\lazy\lazy.js:91:13)
at Lazy. (xyz\node_modules\lazy\lazy.js:73:19)
at Lazy.emit (events.js:182:13)
at Lazy. (xyz\node_modules\lazy\lazy.js:74:22)
at Lazy.emit (events.js:182:13)

In investigation found that fs.unlink() required callback. but in worker.js, callback is not being passed.

if (process.platform === 'win32') {
        //
        // On Windows, delete the 'symbolic' sock file. This
        // file is used for exploration during `forever list`
        // as a mapping to the `\\.pipe\\*` "files" that can't
        // be enumerated because ... Windows.
        //
        fs.unlink(self._sockFile);
      }

Fixed in #1004

New version is out with a fix!