MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / formatPortInUseError

Function formatPortInUseError

apps/cli/src/http/port.ts:29–39  ·  view source on GitHub ↗
(port: number)

Source from the content-addressed store, hash-verified

27 * 返回端口被占用时统一的友好报错文案。
28 */
29export function formatPortInUseError(port: number): string {
30 return [
31 ``,
32 ` ✖ Error: port ${port} is already in use.`,
33 ``,
34 ` Another process (possibly a ChatLab instance) is using this port. You can:`,
35 ` • Use another port: chatlab start --port <port>`,
36 ` • Find the process: lsof -iTCP:${port} -sTCP:LISTEN`,
37 ``,
38 ].join('\n')
39}

Callers 1

cli.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected