我尝试Promisify elasticsearch.client.index,我得到Uncaught typeerror中间值不是makeNodePromissifedEval的函数
我使用bluebird 3.5.0 node js 8.1.2
当您不使用分号时,有时会发生此错误。
由于你没有包含你的代码,所以不可能判断是否是这种情况,但是当人们询问这个错误时,他们会丢失分号。
例:
// 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