在使用BlueBird.Promisify时,未捕获的typeError中间值不是函数

我尝试Promisify elasticsearch.client.index,我得到Uncaught typeerror中间值不是一个函数在makeNodePromissifedEval

我使用blubebird 3.5.0 nodejs 8.1.2

当你不使用分号时有时会发生这个错误。

由于你没有包含你的代码,所以不可能告诉你是否是这种情况,但是当人们询问这个错误时他们错过了分号是95%​​。

例:

// missing semicolons: const x = 10 (x => console.log(x))(20) // TypeError: 10 is not a function // semicolons present: const x = 10; (x => console.log(x))(20); // works fine