Skip to content

Troubleshooting

Biome is designed to be fast and to work without much setup. When it does not, the cause is usually a folder it should not be looking at, or a rule that needs more work than the others.

Most slowdowns come from Biome processing more files than it needs to, or from rules that analyze your whole project. Try the following steps in order, and check whether things improve after each one.

Folders such as dist/ or build/ often contain large, minified files that you do not need to check. Exclude them with a force-ignore pattern, which starts with !!, in files.includes:

biome.json
{
"files": {
"includes": ["**", "!!**/dist", "!!**/build"]
}
}

Unlike a regular ! pattern, a !! pattern also stops Biome from indexing these files in the background.

Some rules need information about your whole project, for example to detect import cycles, unresolved imports, or unhandled promises. When you enable one of them, Biome first scans your project and its dependencies, which can make it several times slower on large codebases.

These rules belong to the project and types domains. Try disabling those domains to see if they are the cause:

biome.json
{
"linter": {
"domains": {
"project": "none",
"types": "none"
}
}
}

If this helps, but you want to keep the rules, the slowdown probably comes from scanning your dependencies. As a test, force-ignore node_modules with "!!**/node_modules" in files.includes.

Type information from your dependencies is then no longer available, so ignore only the dependency that causes the problem. The next sections help you find it.

If the slowdown comes from the types domain, pass --profile-type-inference to lint or check to see how long Biome spends on type inference. This flag is available since Biome v2.6.

npx biome lint --profile-type-inference

The report groups the results by file and lists only the most expensive operations in each one. To see every operation, also pass --verbose. The output is long, so profile one file at a time:

npx biome lint --profile-type-inference --verbose src/slow-file.ts

If the steps above did not help, record a trace to see which files take the longest. Run any command with the following flags:

npx biome lint --log-level=tracing --log-kind=json --log-file=tracing.json

This writes timing information for every step to tracing.json. The file can be large, so use a tool such as jq to filter it. For example, to list how long Biome spent analyzing each file:

Terminal window
jq 'select(.span.name == "pull_diagnostics") | { path: .span.path, time_busy: .["time.busy"] }' tracing.json > slowest.json

Replace pull_diagnostics with another step to investigate it:

Step What it measures
pull_diagnostics Linting and analyzing a file.
format_file Formatting a file.
open_file_internal Opening and parsing a file. Its reason field tells you why the file was opened.
update_module_graph_internal Indexing a file for project rules.

Once you know which files are slow, exclude them, or report the problem so that the Biome team can look into it.

If your editor’s Biome process uses a lot of memory, you probably have a rule from the project or types domain enabled.

To understand your types, Biome reads the type definitions (.d.ts files) of your dependencies, including the dependencies of your dependencies. This is necessary because a library can expose types that come from another package you do not install directly.

To reduce memory usage, follow the same steps as in Biome is slow.

When Biome does not behave as you expect, for example because it ignores a file or a rule, the rage command prints the configuration and environment that Biome actually uses:

npx biome rage --linter --formatter

To see what Biome does step by step, write its logs to a file with the BIOME_LOG_FILE and BIOME_LOG_LEVEL environment variables:

Terminal window
BIOME_LOG_FILE=biome-debug.log BIOME_LOG_LEVEL=debug biome check .

If the problem only happens in your editor, look at the logs of the Biome process that your editor uses.

The Biome daemon, which editor extensions connect to, saves its logs in a folder called biome-logs. The location of this folder depends on your operating system:

  • Linux: ~/.cache/biome
  • Windows: C:\Users\<UserName>\AppData\Local\biomejs\biome\cache
  • macOS: /Users/<UserName>/Library/Caches/dev.biomejs.biome

On other operating systems, the folder is in the system’s temporary directory. To print the exact path, run:

npx biome explain daemon-logs

Biome rotates the log files every hour. To include these logs in a bug report, add --daemon-logs to the rage command.

When you report an issue with the VS Code extension, the Biome team may ask you for the LSP trace. Set the biome.lsp.trace.server setting to verbose and repeat the action that caused the issue. The trace appears in the Output panel, under the Biome LSP trace (xxx) option.

If you are still stuck, open an issue and include:

  • The output of biome rage --linter --formatter.
  • A link to a repository that reproduces the problem, if you can share one.
  • For performance issues, the number of files in your project and the timings you measured.