Search code examples
javascriptnode.jsflowtypeflow-typed

Custom Flow type definitions apparently not being read


I have run the following:

$ npm install flow-bin
$ yarn global add flow-typed
$ flow-typed install

Which correctly populates ./flow-typed/npm/ with definitions, some are valid and some are stubs.

But these type definitions for libraries are not showing up in VSCode (with the official flowtype module installed, flowtype.flow-for-vscode—everything coming from the libraries show as typed with any on mouse hover), and running the flow checker from the command line returns no errors, even if I deliberately mis-use a library, such as:

const express = require('express');
express.chicken();

All of the sections in my ./flowconfig file are empty. I have also tried adding my own definitions to the ./flow-typed/ directory (not the npm subdir) to no avail.

Does anyone have suggestions as to what I could be doing wrong and how to fix it?


Solution

  • Seems to have fixed itself when I restarted my laptop.