Skip to content

formatter: Format on save via VSCode Extension hangs as of v0.38.0 of oxfmt #20285

@rb2610

Description

@rb2610

oxfmt version: 0.38.0
Oxc Extension Version: 1.50.0

I have been using this Monorepo Workspace extension for a few years to make working with a large monorepo more manageable. I had around 20 roots set up via the extension.

As of updating oxfmt to 0.38.0 attempting to save any formattable file will cause the formatter to hang and require pressing Skip in the VSCode popup that appears to actually complete the save operation. Interestingly it sometimes does actually format the file straight away, while still causing the save to hang.

This is the output given by oxfmt when this was happening:

2026-03-12T10:31:55.824911Z  INFO tokio-rt-worker oxc_language_server::backend: oxfmt version: 0.38.0

2026-03-12 10:32:01.722 [info] 2026-03-12T10:31:57.309022Z  WARN tokio-rt-worker oxfmt::lsp::server_formatter: Failed to build config resolver: [PACKAGE_PATH_1]/vite.config.ts
Ensure the file has a valid default export of a JSON-serializable configuration object., falling back to default config
2026-03-12T10:31:57.513206Z  WARN tokio-rt-worker oxfmt::lsp::server_formatter: Failed to build config resolver: [PACKAGE_PATH_2]/vite.config.ts
Ensure the file has a valid default export of a JSON-serializable configuration object., falling back to default config
2026-03-12T10:31:57.590024Z  WARN tokio-rt-worker oxfmt::lsp::server_formatter: Failed to build config resolver: [PACKAGE_PATH_3]/vite.config.ts
Ensure the file has a valid default export of a JSON-serializable configuration object., falling back to default config
2026-03-12T10:31:57.695600Z  WARN tokio-rt-worker oxfmt::lsp::server_formatter: Failed to build config resolver: [PACKAGE_PATH_3]/vite.config.ts
Ensure the file has a valid default export of a JSON-serializable configuration object., falling back to default config
2026-03-12T10:31:57.815310Z  WARN tokio-rt-worker oxfmt::lsp::server_formatter: Failed to build config resolver: [PACKAGE_PATH_4]/vite.config.ts
Ensure the file has a valid default export of a JSON-serializable configuration object., falling back to default config

2026-03-12 10:32:02.630 [info] 2026-03-12T10:32:02.032999Z ERROR tokio-rt-worker tower_lsp_server::transport: failed to decode message: failed to encode response: Resource temporarily unavailable (os error 11)

Asking Copilot about the issue, it suggested that the issue was due to the multi-root workspace I'm using, and indeed, removing all but the main root did allow format on save to function as normal.

Only our root folder has an .oxfmtrc.json, from the error message it does appear to be trying to read the vite.config.ts of various packages within the monorepo though.

Additionally, I tested various versions of the VSCode extension, changing this made no impact on the issue. However rolling oxfmt back to 0.37.0 did fix it, while bumping to 0.39.0 did nothing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions