facebook/flow · error · Error

Unsupported .flowconfig option `log.file`. The VS Code…

Error message

Unsupported .flowconfig option `log.file`. The VS Code extension does not support this option.

What it means

The flow-for-vscode extension rejects any .flowconfig containing a log.file option (matched with /^log\.file/mu). The extension manages its own flow server lifecycle, and a user-specified log file conflicts with that management, so startup aborts with this error.

Solutions

  1. Delete the `log.file=...` line from the [options] section of the project's .flowconfig.
  2. If you need flow logs, capture them from the CLI in a separate flowconfig used only for CLI debugging (e.g. .flowconfig.debug), not the one the extension loads.
  3. Reload the VS Code window after editing the flowconfig.

Example fix

; before (.flowconfig)
[options]
log.file=./flow.log

; after
[options]
Defensive patterns

Strategy: validation

Validate before calling

// Lint the flowconfig before the extension rejects it
function flowconfigHasLogFile(flowconfigText) {
  return /^log\.file/mu.test(flowconfigText);
}
if (flowconfigHasLogFile(fs.readFileSync('.flowconfig', 'utf8'))) {
  fail('remove log.file — unsupported by the VS Code extension');
}

Prevention

When it happens

Trigger: A project .flowconfig (or the flowconfig the extension discovers) with `log.file=<path>` under [options]; the extension calls assertNoLogFileOption on that file's contents and throws before launching flow.

Common situations: Teams sharing a .flowconfig between CLI usage (where log.file was set for debugging) and VS Code; copying flowconfig templates that include logging; leftover debugging options never removed.

Related errors


AI-assisted analysis of facebook/flow@f88ac94bcf (2026-08-20). Data as JSON: /api/errors/48067f693d22832b. Report an issue: GitHub.

Appendix: source

Thrown at packages/flow-for-vscode/src/utils/assertNoLogFileOption.ts:10

/**
 * 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.
 */

export default function assertNoLogFileOption(flowconfig: string): void {
  if (/^log\.file/mu.test(flowconfig)) {
    throw new Error(
      'Unsupported .flowconfig option `log.file`. The VS Code extension does not support this option.',
    );
  }
}

View on GitHub (pinned to f88ac94bcf)