奇怪的错误&#34;匹配(regexp:string | RegExp):? Array <string>;&#34;在core.js ruuning Flow v0.52

时间:2017-08-11 11:59:20

标签: javascript node.js flowtype

运行flow v0.52时,会显示以下错误:

node_modules\.bin\flow check --show-all-errors
Library type error:
C:\temp\flow\flowlib_20ad61e3\core.js:304
304:     match(regexp: string | RegExp): ?Array<string>;
                                                ^^^^^^ string. The operand of an arithmetic operation must be a number.

Found 1 error

这是一个内部流量问题,或者如果没有,我该如何跟踪这种错误?

os:windows 7 x64 节点:8.3.0 npm:5.3.0 流量:0.52.0

1 个答案:

答案 0 :(得分:0)

这实际上是应用程序代码本身的错误,只有错误消息是错误的。

.flowconfig中的以下设置:

[options]
traces=10

给了我错误的确切位置。