#1304·terax-ai

Language server toggle fails with "not found on PATH" on Windows after installing the suggested dependency

Author: CobayaaCreated Sep 21, 2026Updated Sep 21, 2026
Labelsbug

Terax version

v0.8.6

Operating system

Windows

OS version

Widows 11 pro x86_64

What happened?

On Windows, the built-in language server entries (PHP, Python, YAML, Shell, JSON, CSS, HTML, Svelte, Vue, Swift, TypeScript, C/C++, Go, Ruff, Zig) all show "not found on PATH" and their toggle does nothing when clicked. When I click the toggle for PHP, Terax prompts me to install the dependency (intelephense), which I did with npm install -g intelephense. After reloading Terax, the toggle still reports intelephense (php) - not found on PATH and won't activate.

The only workaround that works is using Add custom server with the absolute path to the .cmd wrapper, e.g.:

Command: C:\Users\mrsof\AppData\Roaming\npm\typescript-language-server.cmd

Arguments: --stdio

That made the TypeScript server activate correctly. But when I try the same for PHP (C:\Users\mrsof\AppData\Roaming\npm\intelephense.cmd), the server crashes after a Terax restart with: PHP language server keeps crashing at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:151:5) at node:internal/main/run_main_module:33:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } node.js v23.8.0 So there are two separate problems:

The built-in toggles don't resolve executables installed via npm global on Windows (PATH not inherited by the app).

Even with an absolute path to the .cmd wrapper, Node fails with MODULE_NOT_FOUND because the child process doesn't inherit the working directory / NODE_PATH that the npm-generated .cmd wrapper relies on.

What did you expect to happen?

Clicking the toggle for any language should either work out of the box if the binary is installed and on the user's PATH, or show a clear "install instructions" flow that actually activates the server after install.

On Windows, Terax should detect .cmd / .bat / .ps1 wrappers generated by npm and launch them through cmd.exe /c (or the appropriate shell), inheriting the user's environment.

Custom language servers should allow specifying cwd and env so wrappers like intelephense.cmd can resolve their node_modules.

Steps to reproduce

  1. Open Terax on Windows 11.
  2. Go to Settings → Language servers. Every entry except Rust shows "not found on PATH".
  3. Click the toggle for PHP. Terax shows a modal suggesting to install intelephense.
  4. Run npm install -g intelephense in a terminal. Verify with where.exe intelephense that the binary is at C:\Users\mrsof\AppData\Roaming\npm\intelephense.cmd.
  5. Click "Reload" in Terax and toggle PHP again. It still says "not found on PATH" and the toggle reverts.
  6. Workaround: use "Add custom server" with the absolute path to intelephense.cmd and arguments --stdio. 7.Toggle it on — it briefly works, then after closing and reopening Terax the PHP server crashes with MODULE_NOT_FOUND (wrapModuleLoad, run_main_module).

Logs / screenshots

Logs: Error dialog: PHP language server keeps crashing with code: 'MODULE_NOT_FOUND', node.js v23.8.0. where.exe intelephense output: C:\Users\mrsof\AppData\Roaming\npm\intelephense.cmd Same behavior reproduced with typescript-language-server when added via "Add custom server" with absolute path — that one activates, but PHP crashes after restart. Node version: v23.8.0. Intelephense installed globally via npm. php -v returns 8.3.30 and is on PATH. Running intelephense --stdio manually from PowerShell works fine, so it's not a broken install.

Before submitting

  • I searched existing issues and didn't find a duplicate
  • I am running the latest version (or this happens on main)