flowが反応しなくなることがよくあるので試すことを書いた
状態の確認
flowがエディタ上で反応するか
const foo: number = 'bar'
上のような、明らかにエラーが出る代入を書いてみる。
flowサーバーが動いているか
yarn run flow
flowサーバーは動いているがエディタが反応しない時は
エディタをリフレッシュする
vscodeであれば、再読込すればOK
flowサーバーが起動しない場合
The flow server is not responding (0 retries remaining): /
Out of retries, exiting!
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
こんな感じのメッセージが出る。
globalのバージョンとcurrent projectとのバージョンに差分がないか確認する
yarn global ls
の結果とpackage.jsonを見比べる。
差分がある場合は合わせるか、globalを消す
最終手段:再インストール
自分はたまになる。
yarn remove flow
yarn add -D flow