paperclipai/paperclip · error

Invalid --port value: ${rawPort}

Error message

Invalid --port value: ${rawPort}

What it means

Error "Invalid --port value: ${rawPort}" thrown in paperclipai/paperclip.

Source

Thrown at packages/plugins/sdk/src/dev-cli.ts:24

  const index = process.argv.indexOf(flag);
  if (index < 0) return undefined;
  return process.argv[index + 1];
}

/**
 * CLI entrypoint for the local plugin UI preview server.
 *
 * This is intentionally minimal and delegates all serving behavior to
 * `startPluginDevServer` so tests and programmatic usage share one path.
 */
async function main() {
  const rootDir = parseArg("--root") ?? process.cwd();
  const uiDir = parseArg("--ui-dir") ?? "dist/ui";
  const host = parseArg("--host") ?? "127.0.0.1";
  const rawPort = parseArg("--port") ?? "4177";
  const port = Number.parseInt(rawPort, 10);
  if (!Number.isFinite(port) || port <= 0 || port > 65535) {
    throw new Error(`Invalid --port value: ${rawPort}`);
  }

  const server = await startPluginDevServer({
    rootDir: path.resolve(rootDir),
    uiDir,
    host,
    port,
  });

  // eslint-disable-next-line no-console
  console.log(`Paperclip plugin dev server listening at ${server.url}`);

  const shutdown = async () => {
    await server.close();
    process.exit(0);
  };

  process.on("SIGINT", () => {

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Pass a valid integer TCP port (1-65535) to --port.

When it happens

Trigger: Thrown at packages/plugins/sdk/src/dev-cli.ts:24 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/6a0dd0dd9cd9322c. Report an issue: GitHub.