I get this message when trying to start the flow server on a Mac by just entering "flow".
I do not have a flow server running in a different terminal.
I installed flow with "npm install -g flow-bin".
I did not install it using homebrew.
Thanks for reporting!
If you still have the terminal output around, or you are able to reproduce the issue, can you provide a verbatim transcript of your session? (Or at least as much as you can/feel comfortably with.)
That particular error message should be accompanied by more output, specifically a) the number of retries remaining and b) some status like [parsing]
, [merging inference]
or [processing]
.
Also, Flow should have output a path to a log file. The contents of that log file would be enormously helpful to debug this issue.
Here is the session output:
flow$ flow
Launching Flow server for /Users/Mark/Documents/training/React/react-examples/flow
Spawned flow server (child pid=5640)
Logs will go to /private/tmp/flow/zSUserszSMarkzSDocumentszStrainingzSReactzSreact-exampleszSflow.log
Launching Flow server for /Users/Mark/Documents/training/React/react-examples/flow
Spawned flow server (child pid=5668)
Logs will go to /private/tmp/flow/zSUserszSMarkzSDocumentszStrainingzSReactzSreact-exampleszSflow.log
Launching Flow server for /Users/Mark/Documents/training/React/react-examples/flow
Spawned flow server (child pid=5695)
Logs will go to /private/tmp/flow/zSUserszSMarkzSDocumentszStrainingzSReactzSreact-exampleszSflow.log
Launching Flow server for /Users/Mark/Documents/training/React/react-examples/flow
Spawned flow server (child pid=5722)
Logs will go to /private/tmp/flow/zSUserszSMarkzSDocumentszStrainingzSReactzSreact-exampleszSflow.log
The flow server is not responding (0 retries remaining): [processing] /
Out of retries, exiting!
flow$
Here is the log file content:
[2016-02-20 22:32:53] Initializing Server (This might take some time)
[2016-02-20 22:32:53] executable=/usr/local/lib/node_modules/flow-bin/vendor/flow
[2016-02-20 22:32:53] version=0.22.0
/Users/Mark/Documents/training/React/react-examples/flow/flow-libs/ No such file or directory
[2016-02-20 22:32:53] Parsing
/Users/Mark/Documents/training/React/react-examples/flow/public No such file or directory
[2016-02-20 22:32:53] Building package heap
[2016-02-20 22:32:53] Running local inference
[2016-02-20 22:32:53] Re-resolving directly dependent files
[2016-02-20 22:32:53] Calculating dependencies
[2016-02-20 22:32:53] Merging
[2016-02-20 22:32:53] Done
[2016-02-20 22:32:53] Server is READY
[2016-02-20 22:32:53] Took 0.480581 seconds to initialize.
Fatal error: exception End_of_file
I think I see the problem. Here is my .flowconfig file:
[ignore]
.*/node_modules
[include]
public
../node_modules/
[libs]
flow-libs/
[options]
module.name_mapper='.css$' -> 'empty/object'
Note how it references the directories flow-libs and public. Those directories didn't exist. After I added those, it worked. Maybe error messages that describe that issue could be added or maybe that shouldn't be an error.
Thanks! We absolutely should fix the error message here. What's happening
is an unhandled exception that crashes the server, which we need to catch.
Will attempt to repro using the information provided.
On Sun, Feb 21, 2016 at 4:15 AM Mark Volkmann [email protected]
wrote:
I think I see the problem. Here is my .flowconfig file:
[ignore]
.*/node_modules[include]
public
../node_modules/[libs]
flow-libs/[options]
module.name_mapper='.css$' -> 'empty/object'Note how it references the directories flow-libs and public. Those
directories didn't exist. After I added those, it worked. Maybe error
messages that describe that issue could be added or maybe that shouldn't be
an error.—
Reply to this email directly or view it on GitHub
https://github.com/facebook/flow/issues/1428#issuecomment-186814022.
Pretty sure we fixed this crash in 0.26 or 0.27. Let me know if it happens again!
This happened to me today with flow 0.37.4. I ended up rebooting to get it to work again.
This is still happening to me as well
Getting this error when running it
$ yarn run flow
yarn run v0.21.3
$ "C:\Users\Brian\dev\personal\website\node_modules\.bin\flow"
Launching Flow server for C:\Users\Brian\dev\personal\website
Spawned flow server (pid=1148)
Logs will go to C:\Users\Brian\AppData\Local\Temp\flow\CzCzBUserszB
BrianzBdevzBpersonalzBwebsite.log
flow is still initializing; this can take some time. [local inferen
flow is still initializing; this can take some time. [merging infer
flow is still initializing; this can take some time. [merging infer
flow is still initializing; this can take some time. [merging infer
The flow server is not responding (3 retries remaining): [processin
The flow server is not responding (2 retries remaining): [processin
The flow server is not responding (1 retry remaining): [processing]
The flow server is not responding (0 retries remaining): [processin
g] /
Out of retries, exiting!
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation ab
out this command.
It is happening still with 0.46.0 on windows
There is another (open) issue: #3323
This happens for me when I use the following configuration on Windows 10.
[ignore]
.*/node_modules/stylelint/.*
[include]
[libs]
[options]
Folks, in my case (I'm on Windows 10) the issue were resolved by running watchman watch-del-all and then uninstalling watchman. It seems just weird but anytime I install watchman flow doesn't work.
This is still happening. I experienced on windows 10. I removed the contents of .flowconfig
re-ran flow and added the contents of .flowconfig
back.
I just experienced this on macOS High Sierra, couldn't fix using any of the ideas above.
However, soon my mac got quite noisy so I opened up Activity Monitor and saw that flow was using 37GB of Memory. I quit it in Activity Monitor and that fixed it, running flow again works now.
Same here (windows 10).
Probably an issue with .flowconfig that goes unreported and crashes the server.
I'm having this issue too on windows 10. This issue appears to be random, sometimes just adding a blank line in the .flowconfig file and running flow again makes it work, the same for deleting all the contents and then adding the file again. Sometimes, a flow.exe process is left behind and this causes the issue too - stopping the process and running flow again fixes the issue.
I'll have to stop using flow due to this, it's really annoying.
My solution involves killing all instances of it pkill -f flow-bin
on osx with [email protected] installed locally.
Still occurs macOS
I tried the solution that @gtdeng proposed, but running npm run flow
afterwards still results in the error The flow server is not responding
.
I'm using the .flowconfig file that react-native init
creates for you, with the version modified to ^0.65.0
as I got errors when I used npm i [email protected]
. I noticed that in [libs], node_modules/react-native/flow-github/
was listed. I removed it and flow started working again, but throws the following error after finding a typing error:
Error: src/App.js:24
24: return x;
^ number. This type is incompatible with the expected return type of
22: function foo(x: ?number): string {
^^^^^^ string
Found 1 error
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] flow: `flow`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] flow script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/aapiane09/.npm/_logs/2018-02-11T23_36_45_792Z-debug.log
Running flow status
afterwards did not repeat this error, though.
@gtdeng solution works the first time I ran flow status after it crashed, it restarted the background process and reported the errors as before. But when I tried to run flow status again I experienced the same error message above
The flow server is not responding (0 retries remaining): /
Out of retries, exiting!
running flow check
command instead of flow status
seems to be ok for me
Faced with this issue b/c flow was installed globally, and global's version mismatch local project's one. Removing global fixed the issue.
I was getting The flow server is not responding
on Mac OS X a lot, but haven't seen those on Linux. So I decided to run Flow from Docker
docker run -v $(pwd):/opt/project -w /opt/project stereobooster/flow
But I haven't yet figured out how to keep Flow server running in the background
An empty [include]
'section' was my issue. Removing the [include]
line (which was unused anyway) fixed my problem.
I was having this problem when running yarn flow
, but when I tried yarn flow check
it crashed with some JSON file it was parsing. So adding it to the [ignore]
section fixed the problem. In my case: .*/node_modules/watchify/node_modules/module-deps/test/invalid_pkg/package.json
@achepukov solution fixed it for me. Everything starts working now after removing the flow-bin
installed globally.
Here's one more solution!
Working from a 64-bit windows 10 machine, I discovered that another flow server was running by executing npm run flow stop
which output the following:
> flow "stop"
Trying to connect to server for `<path_to_project>`
Attempting to meanly kill server for `<path_to_project>`
Successfully killed server for `<path_to_project>
Executing npm run flow
after that seemed to work just fine 😄
Try stopping flow (flow stop
) first then run it. In my case, an instance of flow server was already running, not sure why, maybe it was a zombie from before or maybe I just forgot about it after running flow once.
Edit: @wmik already beat me to it :smile:
hey :) sorry to reopen the subject i dunno if there is other topics which were opened since but i had the error me too on mac os (M1 chipset i don t know if that change something), here are the logs of flow:
husky > pre-commit (node v14.16.0)
$ flow
Launching Flow server for /Users/username/...
Spawned flow server (pid=11399)
Logs will go to /private/tmp/flow/projectUserName.log
Monitor logs will go to /private/tmp/flow/projectUserName.monitor_log
Started a new flow server: -Please wait. Server is starting up
Please wait. Server is starting up
Please wait. Server is starting up
Please wait. Server is starting up
Lost connection to the flow server (3 retries remaining)
Most helpful comment
My solution involves killing all instances of it
pkill -f flow-bin
on osx with [email protected] installed locally.