0

我正在尝试使用wit.ai框架开发一个facebook messenger bot应用程序。当我使用命令运行我的node.js代码时,应用程序运行良好

节点应用程序.js

但是当我尝试使用下面的永久命令运行它时,我在机智库文件中收到以下错误。

永远 -o out.log -e err.log 启动 app.js

string_decoder.js:66 var buflen = buffer.length; ^

TypeError:无法读取 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)
在 Object. (/home/user/example/app.js:540:8) 在 Module._compile (module.js:409:26)
在 Object.Module._extensions..js (module.js:416:10)
在 Module.
在 Function.Module._load (module.js:300:12)
在 Function.Module.runMain (module.js:441:10) 处加载 (module.js:343:32 )

任何帮助将不胜感激!

4

1 回答 1

0

我找到了一个解决方法,这是由 github 中的其他人建议的。在 wit.js 第 300 行替换

this.rl.write(null, {ctrl: true, name: 'e'});

this.rl.write('', {ctrl: true, name: 'e'});

于 2016-07-06T06:44:45.573 回答