【发布时间】:2019-01-23 13:02:53
【问题描述】:
尝试在 nodejs 应用程序中使用 cassandra 驱动程序 3.5。通过 cassandra.Client({}) 实例化客户端时,会出现以下错误:
TypeError: Cannot read property 'bind' of undefined
at Object.Client (....path..../lambdas/data-upload/node_modules/cassandra-driver/lib/client.js:307:63)
客户端代码第307行是:
this.options = clientOptions.extend({ logEmitter: this.emit.bind(this) }, options);
所以“this.emit.bind”是它失败的地方。
环境是节点 8.10(也尝试过 8.11)和驱动程序版本 3.5(尝试过 3.4 但具有相同的代码)。
【问题讨论】: