vercel/next.js · error

The Node.js debugger port is already open at ${process.debug

Error message

The Node.js debugger port is already open at ${process.debugPort}. Ignoring '--inspect${inspect === true ? '' : `"${formatDebugAddress(inspect)}"`}'.

What it means

nextStart checks inspector.url() before honoring --inspect; when the Node.js debugger is already listening (e.g. the process was started with node --inspect), it logs this notice and skips opening a second inspector session on the requested address.

Source

Thrown at packages/next/src/cli/next-start.ts:57

 * @param options The options for the start command
 * @param directory The directory to start the server in
 */
const nextStart = async (options: NextStartOptions, directory?: string) => {
  const dir = getProjectDir(directory)
  const hostname = options.hostname
  const inspect = options.inspect
  const port = options.port
  const keepAliveTimeout = options.keepAliveTimeout

  if (isPortIsReserved(port)) {
    printAndExit(getReservedPortExplanation(port), 1)
  }

  if (inspect) {
    const inspector = await import('inspector')
    const isInspecting = inspector.url() !== undefined
    if (isInspecting) {
      Log.warn(
        `The Node.js debugger port is already open at ${process.debugPort}. Ignoring '--inspect${inspect === true ? '' : `="${formatDebugAddress(inspect)}"`}'.`
      )
    } else {
      const inspectAddress: DebugAddress =
        inspect === true ? getParsedDebugAddress(true) : inspect
      // TODO: Implement --inspect-wait
      const wait = false
      try {
        inspector.open(inspectAddress.port, inspectAddress.host, wait)
      } catch (error) {
        console.error(
          `Failed to start the Node.js inspector with --inspect="${formatDebugAddress(inspectAddress)}":`,
          error
        )
        return process.exit(1)
      }
    }
  }

View on GitHub (pinned to 0eb3775416)

Solutions

  1. Remove the duplicate `--inspect` flag, or close the existing debugger session using that port.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/next/src/cli/next-start.ts:57 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19). Data as JSON: /api/errors/71436f97996a17b1. Report an issue: GitHub.