{"record":{"id":"b984985b36ab9655","repo":"vercel/next.js","slug":"next-start-does-not-work-with-output-export-c","errorCode":null,"errorMessage":"\"next start\" does not work with \"output: export\" configuration. Use \"npx serve@latest out\" instead.","messagePattern":"\"next start\" does not work with \"output: export\" configuration\\. Use \"npx serve@latest out\" instead\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/next.ts","lineNumber":388,"sourceCode":"        // from next.config.js\n      }\n    }\n\n    return config\n  }\n\n  private async getServer() {\n    if (!this.serverPromise) {\n      this.serverPromise = this[SYMBOL_LOAD_CONFIG]().then(async (conf) => {\n        if (!this.options.dev) {\n          if (conf.output === 'standalone') {\n            if (!process.env.__NEXT_PRIVATE_STANDALONE_CONFIG) {\n              log.warn(\n                `\"next start\" does not work with \"output: standalone\" configuration. Use \"node .next/standalone/server.js\" instead.`\n              )\n            }\n          } else if (conf.output === 'export') {\n            throw new Error(\n              `\"next start\" does not work with \"output: export\" configuration. Use \"npx serve@latest out\" instead.`\n            )\n          }\n        }\n\n        this.server = await this.createServer({\n          ...this.options,\n          conf,\n        })\n        if (this.preparedAssetPrefix) {\n          this.server.setAssetPrefix(this.preparedAssetPrefix)\n        }\n        return this.server\n      })\n    }\n    return this.serverPromise\n  }\n","sourceCodeStart":370,"sourceCodeEnd":406,"githubUrl":"https://github.com/vercel/next.js/blob/0ae8c72462952df163f1b1e0726641bc5b40dc93/packages/next/src/server/next.ts#L370-L406","documentation":"Thrown by NextServer.getServer() during startup when next.config.js has output: 'export' and the server is not in dev mode. An exported build produces only static HTML/JS/CSS in the `out` directory and has no Node server runtime, so `next start` cannot serve it.","triggerScenarios":"Configuring `output: 'export'` in next.config.js and then running `next start`. getServer() checks `if (!this.options.dev) { ... else if (conf.output === 'export') throw }`.","commonSituations":"Switching a project to static export but keeping the `next start` script in package.json; CI pipeline that always runs build+start regardless of output mode.","solutions":["Serve the static `out` directory with a static file server: `npx serve@latest out`.","Deploy the `out` folder to a static host (Vercel, Netlify, GitHub Pages, S3+CloudFront, Nginx).","If you actually need a Node server runtime, remove `output: 'export'` from next.config.js."],"exampleFix":"// before (next.config.js)\nmodule.exports = { output: 'export' }\n# then: next start  // fails\n// after\nmodule.exports = { output: 'export' }\n# then: next build && npx serve@latest out","handlingStrategy":"validation","validationCode":"// Before starting, branch on output mode.\nconst cfg = require('./next.config.js')\nif (cfg.output === 'export') {\n  console.log('output:export -> serving static out/ with a static server')\n  // spawn `npx serve@latest out` instead of next start\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["If using output: 'export', never run `next start` — serve `out/` statically.","Adjust package.json scripts so `start` runs a static server for export projects.","Use a static host (Vercel/Netlify/Nginx) for exported builds.","Only keep output: 'export' if you truly don't need a Node server runtime."],"tags":["export","static","output-config","production","startup"],"analyzedSha":"0ae8c72462952df163f1b1e0726641bc5b40dc93","analyzedAt":"2026-08-06T19:44:29.143Z","schemaVersion":2},"datasetVersion":"2026-08-07T02:17:10.218Z"}