Flow: Flow client/server version mismatch

Created on 7 Feb 2016  ·  6Comments  ·  Source: facebook/flow

I just did a fresh install of flow using npm install -g flow-bin and now when I run flow from the command line, I see this message on a loop until I exit.

Launching Flow server for /Users/paulyoung/git/temp
Spawned flow server (child pid=58988)
Logs will go to /private/tmp/flow/zSUserszSpaulyoungzSgitzStemp.log
The flow server's version didn't match the client's, so it exited.
Going to launch a new one.

At the bottom, it consistently says:

The flow server is not responding (3 retries remaining): [processing]

The log files all have this content:

[2016-02-07 10:07:21] Initializing Server (This might take some time)
[2016-02-07 10:07:21] executable=/Users/paulyoung/.nvm/versions/v5.0.0/lib/node_modules/flow-bin/vendor/flow
[2016-02-07 10:07:21] version=0.21.0
[2016-02-07 10:07:21] Parsing
[2016-02-07 10:07:21] Building package heap
[2016-02-07 10:07:21] Running local inference
[2016-02-07 10:07:22] Re-resolving directly dependent files
[2016-02-07 10:07:22] Calculating dependencies
[2016-02-07 10:07:22] Merging
[2016-02-07 10:07:22] Done
[2016-02-07 10:07:22] Server is READY
[2016-02-07 10:07:22] Took 0.317220 seconds to initialize.
Status: Error
flow server is out of date. Exiting.

Running npm ls -g --depth=0 says:

/Users/paulyoung/.nvm/versions/v5.0.0/lib
└── [email protected]

Running flow version says:

Flow, a static type checker for JavaScript, version 0.19.1

Most helpful comment

My mistake! I had another version of flow installed using homebrew.

All 6 comments

My mistake! I had another version of flow installed using homebrew.

I have a competition between VSCode flow plugin and flow server that I am desperately trying to run via flow from Terminal. I wonder if it's possible to have individual instances of flow server running as opposed to flow-bin picking up random binaries all over the system, the reality is it doesn't work, it goes like this for hours:

$ flow
The flow server's version didn't match the client's, so it exited.
Going to launch a new one.

The flow server's version didn't match the client's, so it exited.
Going to launch a new one.

The flow server's version didn't match the client's, so it exited.
Going to launch a new one.

The flow server's version didn't match the client's, so it exited.
Going to launch a new one.

The flow server's version didn't match the client's, so it exited.
Going to launch a new one.

The flow server's version didn't match the client's, so it exited.
Going to launch a new one.

The flow server's version didn't match the client's, so it exited.
Going to launch a new one.

The flow server's version didn't match the client's, so it exited.
Going to launch a new one.

The flow server's version didn't match the client's, so it exited.
Going to launch a new one.

The flow server's version didn't match the client's, so it exited.
Going to launch a new one.

any tips on how to "debug" this error? I believe i have the exact same version in my project and global version :(

@a7madgamal it's impossible to match the versions esp. if you have a team of 10 people working on different projects, each uses it's own version of flow. The best solution that worked for me so far was to uninstall the global flow and run the flow from node_modules.

that's what I also tried and it seems to work :)
thanks for the tip. for anyone reading this and using atom/nuclide make sure to enable the "use local flow bin" option in nuclide settings under flow

I removed the global version and then removed node_modules and reinstalled dependencies. Worked.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

STRML picture STRML  ·  48Comments

MarcoPolo picture MarcoPolo  ·  67Comments

Macil picture Macil  ·  47Comments

TylerEich picture TylerEich  ·  49Comments

gabro picture gabro  ·  57Comments