Skip to content

Extension 'Oxc' is configured as formatter but it cannot format 'TypeScript'-files #185

@raythurnvoid

Description

@raythurnvoid

Confirm that this is a Bug for the editor extension, not the CLI

  • This bug does not happen in the Oxlint/Oxfmt CLI
  • After restarting the editor, the bug still appears

Versions used

VS Code extension: v1.51.0
oxlint: v1.57.0
oxfmt: v0.42.0
VS Code version: Cursor 2.6.22 (VS Code 1.105.1)
Operating System and Version: Windows 11 / win32 10.0.26200.8039
Node Version: v24.14.1
Node Manager: vite-plus (active `node` on PATH), with nvm4w also installed

What happened?

I have no idea how to reproduce the issue, the extension seems just unreliable, sometimes it works, sometimes it just doesn't after restarting Cursor. I have 2 projects in which I tried to set-up oxc, one is a regular project, the extension did not work out of the box, i had to hardcode the absolute path of the oxc bin to make it work, but that seems fine now.

The other one is monorepo, I work on it using a multi-root workspace, I never managed to make oxc work in multi-root mode but then I tried by opening the folder directly and after some hours of completely random trial and error i was able to make it work briefly twice, but then on restart again i was back at square 0.

I do not have any error in the logs so everything feels completely random to me and i cannot figure it out the steps to make it work or to break it to be honest, I will update this report if i find out something.

Reproduction repo

N/A

Output channel log

I'm gonna paste logs from multiple sessions, the first one in the logs have some errors in the Extensions Host but the others have no errors but Oxc just does not start anyway

Oxc (Fmt)
2026-03-29 19:03:39.961 [info] 2026-03-29T18:03:39.640609Z  INFO tokio-rt-worker oxc_language_server::backend: initialize: Some([WorkspaceOption { workspace_uri: Uri(Uri { scheme: "file", authority: Some(Authority { userinfo: None, host: "", host_parsed: RegName(""), port: None }), path: "/c%3A/Users/rt0/Documents/workspace/rt0/t3-chat", query: None, fragment: None }), options: Object {"fmt.experimental": Bool(true), "fmt.configPath": String("packages/app/vite.config.ts")} }])
2026-03-29T18:03:39.640671Z  INFO tokio-rt-worker oxc_language_server::backend: oxfmt version: 0.42.0

2026-03-29 19:09:54.413 [info] Searching for oxfmt binary.
2026-03-29 19:09:54.413 [info] Using server binary at: C:\Users\rt0\Documents\workspace\rt0\t3-chat\node_modules\.pnpm\oxfmt@0.42.0\node_modules\oxfmt\bin\oxfmt
2026-03-29 19:09:54.478 [info] 2026-03-29T18:09:54.477965Z  INFO tokio-rt-worker oxc_language_server::backend: initialize: Some([WorkspaceOption { workspace_uri: Uri(Uri { scheme: "file", authority: Some(Authority { userinfo: None, host: "", host_parsed: RegName(""), port: None }), path: "/c%3A/Users/rt0/Documents/workspace/rt0/t3-chat", query: None, fragment: None }), options: Object {"fmt.experimental": Bool(true), "fmt.configPath": String("packages/app/vite.config.ts")} }])
2026-03-29T18:09:54.478032Z  INFO tokio-rt-worker oxc_language_server::backend: oxfmt version: 0.42.0

2026-03-29 19:10:57.607 [info] Searching for oxfmt binary.
2026-03-29 19:10:57.607 [info] Using server binary at: C:\Users\rt0\Documents\workspace\rt0\t3-chat\node_modules\.pnpm\oxfmt@0.42.0\node_modules\oxfmt\bin\oxfmt
2026-03-29 19:10:57.643 [info] 2026-03-29T18:10:57.628097Z  INFO tokio-rt-worker oxc_language_server::backend: initialize: Some([WorkspaceOption { workspace_uri: Uri(Uri { scheme: "file", authority: Some(Authority { userinfo: None, host: "", host_parsed: RegName(""), port: None }), path: "/c%3A/Users/rt0/Documents/workspace/rt0/t3-chat", query: None, fragment: None }), options: Object {"fmt.experimental": Bool(true), "fmt.configPath": String("packages/app/vite.config.ts")} }])
2026-03-29T18:10:57.628158Z  INFO tokio-rt-worker oxc_language_server::backend: oxfmt version: 0.42.0

2026-03-29 19:13:13.653 [info] Searching for oxfmt binary.
2026-03-29 19:13:13.653 [info] Using server binary at: C:\Users\rt0\Documents\workspace\rt0\t3-chat\node_modules\.pnpm\oxfmt@0.42.0\node_modules\oxfmt\bin\oxfmt
2026-03-29 19:13:13.714 [info] 2026-03-29T18:13:13.713972Z  INFO tokio-rt-worker oxc_language_server::backend: initialize: Some([WorkspaceOption { workspace_uri: Uri(Uri { scheme: "file", authority: Some(Authority { userinfo: None, host: "", host_parsed: RegName(""), port: None }), path: "/c%3A/Users/rt0/Documents/workspace/rt0/t3-chat", query: None, fragment: None }), options: Object {"fmt.experimental": Bool(true), "fmt.configPath": String("packages/app/vite.config.ts")} }])
2026-03-29T18:13:13.714045Z  INFO tokio-rt-worker oxc_language_server::backend: oxfmt version: 0.42.0
Extensions Host
2026-03-29 19:03:30.693 [error] Error: Client is not running and can't be stopped. It's current state is: starting
    at e.LanguageClient.shutdown (c:\Users\rt0\.cursor\extensions\oxc.oxc-vscode-1.51.0-universal\out\main.js:18:8427)
    at e.LanguageClient.stop (c:\Users\rt0\.cursor\extensions\oxc.oxc-vscode-1.51.0-universal\out\main.js:18:8014)
    at e.LanguageClient.stop (c:\Users\rt0\.cursor\extensions\oxc.oxc-vscode-1.51.0-universal\out\main.js:18:43957)
    at e.LanguageClient.dispose (c:\Users\rt0\.cursor\extensions\oxc.oxc-vscode-1.51.0-universal\out\main.js:18:8091)
    at an.disposeResources (c:\Users\rt0\.cursor\extensions\oxc.oxc-vscode-1.51.0-universal\out\main.js:22:5032)
    at an.deactivate (c:\Users\rt0\.cursor\extensions\oxc.oxc-vscode-1.51.0-universal\out\main.js:22:5306)
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
    at async Promise.all (index 1)
    at async Module.dn [as deactivate] (c:\Users\rt0\.cursor\extensions\oxc.oxc-vscode-1.51.0-universal\out\main.js:25:695)
    at async Promise.all (index 30)
    at async TOs._deactivateAll (file:///c:/Users/rt0/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:146:12569)
2026-03-29 19:03:30.697 [error] Error: Channel has been closed
    at r (file:///c:/Users/rt0/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:3270)
    at Object.append (file:///c:/Users/rt0/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:3367)
    at Socket.<anonymous> (c:\Users\rt0\.cursor\extensions\oxc.oxc-vscode-1.51.0-universal\out\main.js:18:49709)
    at Socket.emit (node:events:519:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)
    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)
2026-03-29 19:03:30.699 [error] Error: Channel has been closed
    at r (file:///c:/Users/rt0/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:3270)
    at Object.append (file:///c:/Users/rt0/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:3367)
    at Socket.<anonymous> (c:\Users\rt0\.cursor\extensions\oxc.oxc-vscode-1.51.0-universal\out\main.js:18:49709)
    at Socket.emit (node:events:519:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)
    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)
2026-03-29 19:03:38.661 [info] ExtensionService#_doActivateExtension oxc.oxc-vscode, startup: false, activationEvent: 'onLanguage:typescript'
2026-03-29 19:09:53.890 [info] ExtensionService#_doActivateExtension oxc.oxc-vscode, startup: false, activationEvent: 'onLanguage:jsonc'
2026-03-29 19:10:44.813 [warning] vscode.json-language-features - Code actions of kind 'source.fixAll.oxc' requested but returned code action is of kind 'source.sort.json'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
2026-03-29 19:10:57.086 [info] ExtensionService#_doActivateExtension oxc.oxc-vscode, startup: false, activationEvent: 'onLanguage:jsonc'
2026-03-29 19:13:13.085 [info] ExtensionService#_doActivateExtension oxc.oxc-vscode, startup: false, activationEvent: 'onLanguage:typescript'

Image

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