Wit ai 基于 node.js 代码 运行 forever 命令抛出错误
Wit ai based node.js code on running with forever command throws error
我正在尝试使用 wit.ai 框架开发一个 facebook messenger bot 应用程序。当我 运行 我的 node.js 代码和命令
时,应用程序 运行 正常
node app.js
但是当我尝试 运行 使用下面的 forever 命令时,我在机智库文件中遇到以下错误。
forever -o out.log -e err.log start app.js
string_decoder.js:66
var buflen = buffer.length;
^
TypeError: 无法读取 属性 'length' 的 null
在 StringDecoder.write (string_decoder.js:66:22)
在 Interface._normalWrite (readline.js:319:30)
在 Interface.write (readline.js:310:49)
在 message.converse.makeActionCallback.runActions.interactive.rl.on [作为
互动] (/home/user/example/lib/wit.js:289:13)
在对象。 (/home/user/example/app.js:540:8) 在 Module._compile (module.js:409:26)
在 Object.Module._extensions..js (module.js:416:10)
在 Module.load (module.js:343:32)
在 Function.Module._load (module.js:300:12)
在 Function.Module.runMain (module.js:441:10)
任何帮助将不胜感激!!
我找到了 github 中其他人建议的解决方法。在 wit.js 行 300 替换
this.rl.write(null, {ctrl: true, name: 'e'});
和
this.rl.write( '', {ctrl: true, name: 'e'});
我正在尝试使用 wit.ai 框架开发一个 facebook messenger bot 应用程序。当我 运行 我的 node.js 代码和命令
时,应用程序 运行 正常node app.js
但是当我尝试 运行 使用下面的 forever 命令时,我在机智库文件中遇到以下错误。
forever -o out.log -e err.log start app.js
string_decoder.js:66 var buflen = buffer.length; ^
TypeError: 无法读取 属性 'length' 的 null
在 StringDecoder.write (string_decoder.js:66:22)
在 Interface._normalWrite (readline.js:319:30)
在 Interface.write (readline.js:310:49)
在 message.converse.makeActionCallback.runActions.interactive.rl.on [作为
互动] (/home/user/example/lib/wit.js:289:13)
在对象。 (/home/user/example/app.js:540:8) 在 Module._compile (module.js:409:26)
在 Object.Module._extensions..js (module.js:416:10)
在 Module.load (module.js:343:32)
在 Function.Module._load (module.js:300:12)
在 Function.Module.runMain (module.js:441:10)
任何帮助将不胜感激!!
我找到了 github 中其他人建议的解决方法。在 wit.js 行 300 替换
this.rl.write(null, {ctrl: true, name: 'e'});
和
this.rl.write( '', {ctrl: true, name: 'e'});