uncaught typeError中间值不是函数,当使用BlueBird.Promisify时[关闭]

问题描述 投票:1回答:1

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

我使用bluebird 3.5.0 node js 8.1.2

javascript node.js bluebird
1个回答
1
投票

当您不使用分号时,有时会发生此错误。

由于你没有包含你的代码,所以不可能判断是否是这种情况,但是当人们询问这个错误时,他们会丢失分号。

例:

// 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
© www.soinside.com 2019 - 2024. All rights reserved.