I am trying to develop a facebook messenger bot application with the use of wit.ai framework. The application runs fine when i run my node.js code with command
node app.js
But when i try to run it with the use of forever command like below i am getting the following error in wit library file.
forever -o out.log -e err.log start app.js
string_decoder.js:66 var buflen = buffer.length; ^
TypeError: Cannot read property 'length' of null
at StringDecoder.write (string_decoder.js:66:22)
at Interface._normalWrite (readline.js:319:30)
at Interface.write (readline.js:310:49)
at message.converse.makeActionCallback.runActions.interactive.rl.on [as
interactive] (/home/user/example/lib/wit.js:289:13)
at Object. (/home/user/example/app.js:540:8) at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
Any help will be highly appreciated!!