vercel/next.js · error

"next start" does not work with "output: export"…

Error message

"next start" does not work with "output: export" configuration. Use "npx serve@latest out" instead.

What it means

Mode check in NextServer.getServer for a production start: the loaded config has output: 'export', which produces static files in out/ with no Node server. next start cannot serve that output, so it refuses and points at a static file server instead; the standalone variant gets a parallel warning.

Solutions

  1. Serve the out/ directory with a static server (e.g. npx serve@latest out) instead of next start.
Defensive patterns

Strategy: validation

When it happens

Trigger: next start is run against an output: export build.

Common situations: Serving a static export with next start instead of a static file server.


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

Appendix: source

Thrown at packages/next/src/server/next.ts:388

        // from next.config.js
      }
    }

    return config
  }

  private async getServer() {
    if (!this.serverPromise) {
      this.serverPromise = this[SYMBOL_LOAD_CONFIG]().then(async (conf) => {
        if (!this.options.dev) {
          if (conf.output === 'standalone') {
            if (!process.env.__NEXT_PRIVATE_STANDALONE_CONFIG) {
              log.warn(
                `"next start" does not work with "output: standalone" configuration. Use "node .next/standalone/server.js" instead.`
              )
            }
          } else if (conf.output === 'export') {
            throw new Error(
              `"next start" does not work with "output: export" configuration. Use "npx serve@latest out" instead.`
            )
          }
        }

        this.server = await this.createServer({
          ...this.options,
          conf,
        })
        if (this.preparedAssetPrefix) {
          this.server.setAssetPrefix(this.preparedAssetPrefix)
        }
        return this.server
      })
    }
    return this.serverPromise
  }

View on GitHub (pinned to 0eb3775416)