Skip to content

[BUG] Oxc language servers start without node on PATH #228

Closed

Description

@gatezh

Summary

The Oxc VS Code extension (oxc-vscode 1.64.1) starts its oxfmt and oxlint language servers with an
environment taken from $SHELL -ilc env. In the claude-code devcontainer, node can be missing
from that PATH, and then the servers don't start. The extension has a setting for this:
oxc.path.node prepends a Node binary's directory to the servers' PATH.

Suggested fix

Add the setting to customizations.vscode.settings in both variants:

// Oxc's oxfmt/oxlint servers don't inherit node on PATH
"oxc.path.node": "/usr/local/bin/node",

Alternative: "oxc.useExecPath": true uses the VS Code server's bundled Node and needs no path.
Its Node version then follows VS Code releases instead of the image's.

Affected files in this repo

  • claude-code/.devcontainer/devcontainer.json
  • claude-code/.devcontainer/claude-sandbox/devcontainer.json

Related

  • oxc-vscode 1.64.1 package.json: oxc.path.node, "Path to a Node.js binary. Will be added to
    the oxfmt and oxlint PATH environment."

Activity

  1. gatezh commented on Oct 22, 2026

    @gatezh
    OwnerAuthor

    Root cause. The extension builds the servers' environment with env -i HOME=… $SHELL -ilc env. Nothing in zsh's startup exports a PATH in that case:

    • zsh's fallback PATH (/bin:/usr/bin:/usr/ucb:/usr/local/bin) is set but not exported.
    • Debian's /etc/zsh/zshenv exports one only when PATH is empty or /bin:/usr/bin.

    So the servers get no PATH. node_modules/.bin/oxlint (#!/usr/bin/env node) then fails with env: 'node': No such file or directory, exit 127. The "write EPIPE" notifications come after that, because the server process is already gone.

    Fix in the image (preferred). Export PATH in /etc/zsh/zshenv from the Dockerfile, for example:

    export PATH="/home/node/.local/share/mise/shims:/usr/local/bin:$PATH"

    This works for every extension that reads the login shell's environment, and projects get it on the next image pull with no devcontainer.json sync. Tested with a .zshenv containing that export: env -i HOME=$HOME zsh -ilc 'command -v node' then prints /usr/local/bin/node.

    Fix in settings (still works). "oxc.path.node": "/usr/local/bin/node" is confirmed working in a downstream project. The server restarted and reported oxlint version: 1.87.0. The catch is that each project has to sync the line in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions