facebook/flow · error · Error

Flow version ${version} doesn't support 'flow lsp'. Please u

Error message

Flow version ${version} doesn't support 'flow lsp'. Please upgrade flow to version ${FLOW_VERSION_FOR_LSP}.

What it means

The VS Code Flow extension only speaks the 'flow lsp' protocol with Flow >= 0.75. Before starting the language server it checks the resolved flow binary's version via checkFlowVersionSatisfies(version, '>=0.75') and throws this error when the check fails.

Source

Thrown at packages/flow-for-vscode/src/utils/assertFlowSupportsLSP.ts:14

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

import checkFlowVersionSatisfies from './checkFlowVersionSatisfies';

const FLOW_VERSION_FOR_LSP = '>=0.75';

export default function assertFlowSupportsLSP(version: string): void {
  if (!checkFlowVersionSatisfies(version, FLOW_VERSION_FOR_LSP)) {
    throw new Error(
      `Flow version ${version} doesn't support 'flow lsp'.` +
        ` Please upgrade flow to version ${FLOW_VERSION_FOR_LSP}.`,
    );
  }
}

View on GitHub (pinned to d1341dac89)

Solutions

  1. Upgrade the project's flow-bin (`npm install --save-dev flow-bin@latest`) and update the .flowconfig [version] header to match
  2. Check the extension's output channel for which flow binary was picked; fix `flow.pathToFlow` or PATH so a current binary is found
  3. If `flow version` output was misparsed (custom builds), report the exact version string to the extension repo

Example fix

# before
# .flowconfig
[version]
0.53.0
# package.json: "flow-bin": "^0.53.0"

# after
[version]
^0.230.0
# npm install --save-dev flow-bin@0.230.0
Defensive patterns

Strategy: validation

Validate before calling

import {execFileSync} from 'child_process';
import semver from 'semver';

function flowSupportsLsp(flowPath: string): boolean {
  try {
    const v = execFileSync(flowPath, ['version'], {encoding: 'utf8'})
      .match(/(\d+\.\d+(?:\.\d+)?/)?.[1];
    return v != null && semver.gte(v, '0.75.0');
  } catch {
    return false;
  }
}

Type guard

function satisfiesLsp(version: string | null | undefined): boolean {
  if (version == null) return false;
  const coerced = semver.coerce(version);
  return coerced != null && semver.satisfies(coerced, '>=0.75');
}

Prevention

When it happens

Trigger: Opening a project with the Flow VS Code extension where the discovered flow binary (flow-bin dependency, pathToFlow setting, or bundled flow) reports a version below 0.75.

Common situations: Legacy projects pinned to ancient flow-bin (0.5x); a stale global `flow` on PATH shadowing the project binary; pathToFlow pointing at an old binary; monorepos resolving an old flow from the workspace root.

Related errors


AI-assisted analysis of facebook/flow@d1341dac89 (2026-08-17). Data as JSON: /api/errors/c3f4498734af9c14. Report an issue: GitHub.