neoclide/coc.nvim · error · Error

Transport kind ipc is not supported for command executable

Error message

Transport kind ipc is not supported for command executable

What it means

Node's child_process does not support IPC-style named-pipe transport for arbitrary command executables the way fork() does. The client therefore rejects a server configuration combining TransportKind.ipc with a command: the ipc transport is only available for Node modules run via fork.

Source

Thrown at src/language-client/index.ts:450

                reject(err)
              })
            })
          }
        })
      } else if (Executable.is(json) && json.command) {
        let command: Executable = json
        let args = Array.isArray(command.args) ? command.args.slice(0) : []
        let pipeName: string | undefined
        const transport = json.transport
        if (transport === TransportKind.stdio) {
          args.push('--stdio')
        } else if (transport === TransportKind.pipe) {
          pipeName = generateRandomPipeName()
          args.push(`--pipe=${pipeName}`)
        } else if (Transport.isSocket(transport)) {
          args.push(`--socket=${transport.port}`)
        } else if (transport === TransportKind.ipc) {
          throw new Error(`Transport kind ipc is not supported for command executable`)
        }
        let options = Object.assign({ shell: process.platform === 'win32' }, command.options) as SpawnOptions
        options.env = getEnvironment(options.env, false)
        options.cwd = options.cwd ?? serverWorkingDir
        options.windowsHide = true
        const attachProcess = (serverProcess: ChildProcess, pipiStdout = true) => {
          this._serverProcess = serverProcess
          this._isDetached = !!options.detached
          logger.info(`Language server "${this.id}" started with ${serverProcess.pid}`)
          if (pipiStdout) pipeStdoutToLogOutputChannel(serverProcess.stdout, this.outputChannel)
          pipeStderrToLogOutputChannel(serverProcess.stderr, this.outputChannel)
        }
        let cmd = workspace.expand(json.command)
        if (transport === undefined || transport === TransportKind.stdio) {
          const serverProcess = child_process.spawn(cmd, args, options)
          if (!serverProcess || !serverProcess.pid) {
            return handleChildProcessStartError(serverProcess, `Launching server using command ${cmd} failed.`)
          }

View on GitHub (pinned to 50e974d969)

Solutions

  1. Switch the transport to TransportKind.stdio for command executables
  2. If ipc is required, run the server as a Node module (module:/fork style ServerOptions)
  3. Use TransportKind.socket or TransportKind.pipe for cross-process transport with binaries
  4. Fix the client options object passed to the language client constructor

Example fix

// before
const serverOptions: ServerOptions = { command: 'myls', transport: TransportKind.ipc }
// after
const serverOptions: ServerOptions = { command: 'myls', transport: TransportKind.stdio }
Defensive patterns

Strategy: validation

Validate before calling

// Validate transport compatibility before constructing ServerOptions
const isNodeModule = typeof server === 'string' && server.startsWith('module:')
if (!isNodeModule && (transport === TransportKind.ipc)) {
  throw new Error('Use stdio/socket/pipe transport for command executables')
}

Try / catch

try {
  const client = new LanguageClient(id, name, serverOptions, clientOptions)
  await client.start()
} catch (e) {
  if (String(e.message).includes('Transport kind ipc is not supported')) {
    // fall back to stdio transport and retry
  } else { throw e }
}

Prevention

When it happens

Trigger: ServerOptions using run: { command: 'foo', transport: TransportKind.ipc } or a transport factory resolving to ipc for an executable-based server.

Common situations: Copy-pasting a node-module ServerOptions transport into a command-based one; switching a server from module to binary form without changing the transport;misreading docs that ipc works everywhere.

Related errors


AI-assisted analysis of neoclide/coc.nvim@50e974d969 (2026-08-31). Data as JSON: /api/errors/aca79175416e5d83. Report an issue: GitHub.