The server seems to quickly stop itself? I am not sure "incorrect version" it is talking about. My .flowconfig matches my flow-bin version.
[2017-09-09T13:26:17.714Z] [INFO] flow - Path to Flow: flow
[2017-09-09T13:26:19.207Z] [INFO] flow - [unknown]: Flow server in /Users/a/hero/hero-server
[2017-09-09T13:26:19.267Z] [INFO] flow - Killed flow server with incorrect version in
[2017-09-09T13:26:19.267Z] [INFO] flow - [not running]: Flow server in /Users/a/hero/hero-server
[2017-09-09T13:26:21.326Z] [INFO] flow - [init]: Flow server in /Users/a/hero/hero-server
[2017-09-09T13:26:27.457Z] [INFO] flow - Killed flow server with incorrect version in
[2017-09-09T13:26:27.458Z] [INFO] flow - [not running]: Flow server in /Users/a/hero/hero-server
[2017-09-09T13:26:43.471Z] [INFO] flow - Killed flow server with incorrect version in
[2017-09-09T13:27:03.537Z] [INFO] flow - Killed flow server with incorrect version in
[2017-09-09T13:27:13.557Z] [ERROR] flow - Invalid JSON result from flow status --json /Users/a/hero/hero-server/src/index.js. JSON:
''.
[2017-09-09T13:29:52.575Z] [INFO] flow - [init]: Flow server in /Users/a/hero/hero-server
[2017-09-09T13:30:03.640Z] [INFO] flow - Killed flow server with incorrect version in
[2017-09-09T13:30:03.640Z] [INFO] flow - [not running]: Flow server in /Users/a/hero/hero-server
[2017-09-09T13:30:43.742Z] [INFO] flow - Killed flow server with incorrect version in
[2017-09-09T13:30:43.743Z] [ERROR] flow - Invalid JSON result from flow status --json /Users/a/hero/hero-server/src/index.js. JSON:
''.
Settings:
"flow.enabled": true,
"flow.runOnEdit": true,
"flow.showStatus": true,
"flow.runOnAllFiles": true,
"flow.stopFlowOnExit": true,
"flow.useNPMPackagedFlow": true
I am able to run flow in terminal with no issues.
UPDATE:
My project is setup like this:
/root
/client
.flowconfig
/server
.flowconfig
I noticed if I enter VSCode in /client or /server then Flow works, but not /root. What am I missing? It works fine if I open 2 separate windows for each directory.
It doesn't seem to work on monorepo. I have the same issue.
+1 experience the same issue
@booboothefool @gmaggess
Found the cause of this issue. If the previous flow server was not successfully stopped and trying to start a new flow server will trigger this issue. You can run flow command directly under the project root directory to find out.
The solution is to
ps or Activity Monitor if you are on MacPlease let me know if it works for you.
Huh looks like this workaround helped me to resolve issue.. but would be good to have proper solution - it happening a lot of that Flow just hangs there afte closing VSCode and computer starts heating... :(
Most helpful comment
@booboothefool @gmaggess
Found the cause of this issue. If the previous flow server was not successfully stopped and trying to start a new flow server will trigger this issue. You can run
flowcommand directly under the project root directory to find out.The solution is to
psorActivity Monitorif you are on MacPlease let me know if it works for you.