facebook/flow · error · Error
Unsupported .flowconfig option `log.file`. The VS Code exten
Error message
Unsupported .flowconfig option `log.file`. The VS Code extension does not support this option.
What it means
On activation, flow-for-vscode reads the project's .flowconfig and rejects it if it contains a `log.file` option (regex /^log\.file/m). The extension's logging integration cannot work while flow also writes a log file, so assertNoLogFileOption throws.
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 d1341dac89)
Solutions
- Remove or comment out the `log.file` line in the workspace's .flowconfig (check all flowconfig variants)
- Use the extension's output channel / VS Code developer tools for logging instead
- Keep a separate flowconfig (e.g. .flowconfig-cli) for CLI runs that need file logs, selected via --flowconfig-name
Example fix
# before (.flowconfig) [options] log.file=./flow.log # after (.flowconfig) [options] # log.file removed; use the extension's output panel
Defensive patterns
Strategy: validation
Validate before calling
const hasLogFileOption = (flowconfig: string): boolean => /^log\.file/mu.test(flowconfig);
const contents = fs.readFileSync(flowconfigPath, 'utf8');
if (hasLogFileOption(contents)) {
// strip or warn before the extension activation path runs
} Type guard
function isSupportedFlowconfig(flowconfig: string): boolean {
return !/^log\.file/mu.test(flowconfig);
} Prevention
- Lint .flowconfig for log.file in CI
- Keep debug/CLI flowconfigs as separate files
- Do not copy CI logging options into the workspace flowconfig
When it happens
Trigger: Starting the Flow VS Code extension on a workspace whose .flowconfig (any section) contains a `log.file=...` line.
Common situations: Configs copied from CLI-heavy setups where flow logs to a file for debugging; debug flowconfigs from CI reused locally; team-shared flowconfig that includes logging for batch runs.
Related errors
- Flow version ${version} doesn't support 'flow lsp'. Please u
- Flow not found
- '${command}' not found
- Unexpected function parameter ${param.type}
- updatePendingStatements: Variable for dependency "${dep}" no
AI-assisted analysis of facebook/flow@d1341dac89 (2026-08-17).
Data as JSON: /api/errors/48067f693d22832b.
Report an issue: GitHub.