Marcus Junius Brutus Marcus Junius Brutus - 3 months ago 23
Javascript Question

Flow using directory "flow-typed" even though I've configured another [lib] value in .flowconfig


file specifies an alternative lib directory named

$ cat .flowconfig | grep -A1 libs

… and I have verified that declarations are indeed picked up from there.

Yet, the presence of a
directory created with flow-typed causes Flow to pick up its definitions from the
directory instead.

I am using

Reading the main Flow documentation I found no reference to any special handling with respect to the
directory. The only reference to its special status is given in the the third party documentation page for flow-typed where the wording clearly states that a different directory can be used by changing the
configuration in

If you need to customize the directory where libdefs are stored in
your project, you can do so by adding a [libs] configuration to your
.flowconfig file:

Is the behaviour I am observing a bug or is it a feature that Flow will always use directory
(if it exists) regardless of the
setting in


First, it's worth noting that Flow v0.27 is pretty old. I recommend upgrading.

This function contains the special handling for flow-typed. Library locations specified under lib are used in addition to the flow-typed folder, not instead of it. It sounds like you're describing intended behavior.

Why do you want to force Flow to ignore the flow-typed folder? Why bother having the flow-typed folder at all if you want to ignore it?