Skip to content

[Bug]: Adding Ubuntu/WSL2 SSH environment fails with "sh: 43: node: not found" #2534

Description

@yutamago

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Open "Connections"
  2. Click "Add environment"
  3. Select the suggested host (pre-configured in my SSH config)

Expected behavior

The environment will be successfully added.

Actual behavior

An error is shown:
sh: 43: node: not found Failed to find an available port on the remote host. Ensure node is available on PATH..

When connecting to the machine directly using SSH, node --version returns v24.15.0.

Impact

Blocks work completely

Version or commit

0.0.22

Environment

T3 Code Desktop Client: Windows 11 (Version 25H2), T3 Code v0.0.22, Node v24.15.0
SSH Server: Ubuntu 24.04.4 LTS (in WSL2), Node v24.15.0

Logs or stack traces

[2026-05-05T21:30:05.887Z] [stdout run=d878a1194ebc] [23:30:05.887] INFO (#173): ssh.environment.ensure.start {
  alias: 'ubuntu',
  hostname: 'ubuntu',
  username: null,
  port: null,
  issuePairingToken: true
}
[2026-05-05T21:30:05.933Z] [stdout run=d878a1194ebc] [23:30:05.933] INFO (#173): ssh.remoteServer.launch.start {
  alias: 'ubuntu',
  hostname: 'localhost',
  username: 'yuta',
  port: 2022,
  runner: 'package',
  packageSpec: 't3@0.0.22',
  stateKey: 'd25753be2978c7f4'
}
[2026-05-05T21:30:16.528Z] [stdout run=d878a1194ebc] [23:30:16.528] WARN (#181): ssh.command.failed {
  alias: 'ubuntu',
  hostname: 'localhost',
  username: 'yuta',
  port: 2022,
  command: [
    'ssh',
    '-o',
    'BatchMode=yes',
    '-o',
    'ConnectTimeout=10',
    '-p',
    '2022',
    'yuta@ubuntu',
    'sh',
    '-s',
    '--',
    'd25753be2978c7f4'
  ],
  exitCode: 1,
  stderr: 'sh: 43: node: not found\n' +
    'Failed to find an available port on the remote host. Ensure node is available on PATH.\n'
}
[2026-05-05T21:30:16.862Z] [stdout run=d878a1194ebc] [23:30:16.862] WARN (#173): ssh.environment.tunnel.create.failed {
  alias: 'ubuntu',
  hostname: 'localhost',
  username: 'yuta',
  port: 2022,
  key: 'ubuntu\x00localhost\x00yuta\x002022',
  cause: SshCommandError: sh: 43: node: not found
  Failed to find an available port on the remote host. Ensure node is available on PATH.
      at C:\Users\yuta\AppData\Local\Programs\t3-code-desktop\resources\app.asar\apps\desktop\dist-electron\main.cjs:5250:17
      at Generator.next (<anonymous>)
      at ~effect/Effect/successCont (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:868:26)
      at ~effect/Effect/evaluate (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/core.js:312:30)
      at FiberImpl.runLoop (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:444:107)
      at FiberImpl.evaluate (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:412:23)
      at file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:719:15
      at Array.<anonymous> (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:1942:15)
      at FiberImpl.evaluate (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:425:25)
      at Array.<anonymous> (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:719:15) {
    command: [
      'ssh',
      '-o',
      'BatchMode=yes',
      '-o',
      'ConnectTimeout=10',
      '-p',
      '2022',
      'yuta@ubuntu',
      'sh',
      '-s',
      '--',
      'd25753be2978c7f4'
    ],
    exitCode: 1,
    stderr: 'sh: 43: node: not found\n' +
      'Failed to find an available port on the remote host. Ensure node is available on PATH.\n',
    _tag: 'SshCommandError'
  }
}
[2026-05-05T21:30:16.863Z] [stderr run=d878a1194ebc] Error occurred in handler for 'desktop:ensure-ssh-environment': SshCommandError: sh: 43: node: not found
Failed to find an available port on the remote host. Ensure node is available on PATH.
    at C:\Users\yuta\AppData\Local\Programs\t3-code-desktop\resources\app.asar\apps\desktop\dist-electron\main.cjs:5250:17
    at Generator.next (<anonymous>)
    at ~effect/Effect/successCont (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:868:26)
    at ~effect/Effect/evaluate (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/core.js:312:30)
    at FiberImpl.runLoop (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:444:107)
    at FiberImpl.evaluate (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:412:23)
    at file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:719:15
    at Array.<anonymous> (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:1942:15)
    at FiberImpl.evaluate (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:425:25)
    at Array.<anonymous> (file:///C:/Users/yuta/AppData/Local/Programs/t3-code-desktop/resources/app.asar/node_modules/effect/dist/internal/effect.js:719:15) {
  command: [
    'ssh',
    '-o',
    'BatchMode=yes',
    '-o',
    'ConnectTimeout=10',
    '-p',
    '2022',
    'yuta@ubuntu',
    'sh',
    '-s',
    '--',
    'd25753be2978c7f4'
  ],
  exitCode: 1,
  stderr: 'sh: 43: node: not found\n' +
    'Failed to find an available port on the remote host. Ensure node is available on PATH.\n',
  _tag: 'SshCommandError'
}

Screenshots, recordings, or supporting files

image.png

Workaround

No response

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on May 5, 2026
  2. juliusmarminge commented on May 5, 2026

    @juliusmarminge
    Member

    may be fixed in #2504

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

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions