{"record":{"id":"c3f4498734af9c14","repo":"facebook/flow","slug":"flow-version-version-doesn-t-support-flow-lsp","errorCode":null,"errorMessage":"Flow version ${version} doesn't support 'flow lsp'. Please upgrade flow to version ${FLOW_VERSION_FOR_LSP}.","messagePattern":"Flow version (.+?) doesn't support 'flow lsp'\\. Please upgrade flow to version (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/flow-for-vscode/src/utils/assertFlowSupportsLSP.ts","lineNumber":14,"sourceCode":"/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport checkFlowVersionSatisfies from './checkFlowVersionSatisfies';\n\nconst FLOW_VERSION_FOR_LSP = '>=0.75';\n\nexport default function assertFlowSupportsLSP(version: string): void {\n  if (!checkFlowVersionSatisfies(version, FLOW_VERSION_FOR_LSP)) {\n    throw new Error(\n      `Flow version ${version} doesn't support 'flow lsp'.` +\n        ` Please upgrade flow to version ${FLOW_VERSION_FOR_LSP}.`,\n    );\n  }\n}\n","sourceCodeStart":1,"sourceCodeEnd":20,"githubUrl":"https://github.com/facebook/flow/blob/f88ac94bcf6992f5d5a158854d94613ebb92c6e6/packages/flow-for-vscode/src/utils/assertFlowSupportsLSP.ts#L1-L20","documentation":"The flow-for-vscode extension requires a Flow version satisfying >=0.75 to use the 'flow lsp' command; assertFlowSupportsLSP throws this error when the resolved flow binary reports an older version. It is a hard gate before the language server starts.","triggerScenarios":"Opening a workspace whose flow-bin (or PATH flow) is older than 0.75 with a modern vscode extension; version detection resolving to a legacy flow install; monorepos where the workspace root resolves an ancient nested flow-bin.","commonSituations":"Old projects pinned to pre-2018 flow versions being opened with a current extension; system PATH containing an old flow; nested node_modules shadowing a newer flow-bin.","solutions":["Upgrade flow-bin in the workspace: npm install -D flow-bin@latest (any version >=0.75 works, latest recommended).","Reload the VS Code window after upgrading so the extension re-resolves the flow path.","Point the extension at a specific binary via the flow path setting if PATH resolution picks an old flow.","If you must stay on <0.75, install an old extension release that predates the LSP requirement."],"exampleFix":"// before\n\"devDependencies\": { \"flow-bin\": \"^0.60.0\" }\n\n// after\n\"devDependencies\": { \"flow-bin\": \"^0.246.0\" }","handlingStrategy":"validation","validationCode":"// Check the version satisfies >=0.75 before the extension asserts\nimport semver from 'semver';\nfunction flowSupportsLSP(version) {\n  return semver.satisfies(semver.coerce(version), '>=0.75');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep flow-bin at a recent version in every workspace you open with the extension.","After changing flow-bin, reload the VS Code window so the version is re-detected.","In monorepos, ensure the workspace root resolves the intended flow-bin."],"tags":["flow","vscode","extension","version","lsp"],"backgroundTag":"version-not-supported","analyzedSha":"f88ac94bcf6992f5d5a158854d94613ebb92c6e6","analyzedAt":"2026-08-20T10:41:37.992Z","contentChangedAt":"2026-08-20T10:41:37.992Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}