earendil-works/pi · error · TypeError
Unix transport path must not be empty
Error message
Unix transport path must not be empty
What it means
Error "Unix transport path must not be empty" thrown in earendil-works/pi.
Source
Thrown at packages/client/src/unix.ts:14
import { createConnection, type Socket } from "node:net";
import { DEFAULT_MAX_FRAME_LENGTH } from "@earendil-works/pi-protocol";
import type { ByteTransport, ByteTransportFactory, ByteTransportHandlers } from "./transport.ts";
const MAX_UNIX_SOCKET_PATH_BYTES = process.platform === "linux" ? 107 : 103;
export interface UnixTransportOptions {
path: string;
maxPendingBytes?: number;
}
/** Creates fresh Unix-domain socket transports for PiClient connection attempts in Node-compatible runtimes. */
export function createUnixTransportFactory(options: UnixTransportOptions): ByteTransportFactory {
if (options.path.length === 0) throw new TypeError("Unix transport path must not be empty");
if (Buffer.byteLength(options.path) > MAX_UNIX_SOCKET_PATH_BYTES) {
throw new TypeError(`Unix transport path is too long; maximum is ${MAX_UNIX_SOCKET_PATH_BYTES} UTF-8 bytes`);
}
const maxPendingBytes = options.maxPendingBytes ?? DEFAULT_MAX_FRAME_LENGTH * 4;
if (!Number.isSafeInteger(maxPendingBytes) || maxPendingBytes <= 0) {
throw new TypeError("Unix transport maxPendingBytes must be a positive safe integer");
}
if (process.platform === "win32") throw new Error("Unix transport is not supported on Windows");
return (handlers) => connectUnixSocket(options.path, maxPendingBytes, handlers);
}
function connectUnixSocket(
path: string,
maxPendingBytes: number,
handlers: ByteTransportHandlers,
): Promise<ByteTransport> {
return new Promise<ByteTransport>((resolve, reject) => {
const socket = createConnection(path);View on GitHub (pinned to 4af9d21d3b)
When it happens
Trigger: Thrown at packages/client/src/unix.ts:14 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/bb222bfb1dd4ff69.
Report an issue: GitHub.