{"record":{"id":"1893eab9a7e7fcc0","repo":"vercel/next.js","slug":"warning-dev-is-not-a-boolean-which-could-introd","errorCode":null,"errorMessage":"Warning: 'dev' is not a boolean which could introduce unexpected behavior. https://nextjs.org/docs/messages/invalid-server-options","messagePattern":"Warning: 'dev' is not a boolean which could introduce unexpected behavior\\. https://nextjs\\.org/docs/messages/invalid-server-options","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/next.ts","lineNumber":673,"sourceCode":"    ) as unknown as NextWrapperServer\n  }\n\n  if (options == null) {\n    throw new Error(\n      'The server has not been instantiated properly. https://nextjs.org/docs/messages/invalid-server-options'\n    )\n  }\n\n  if (\n    !('isNextDevCommand' in options) &&\n    process.env.NODE_ENV &&\n    !['production', 'development', 'test'].includes(process.env.NODE_ENV)\n  ) {\n    log.warn(NON_STANDARD_NODE_ENV)\n  }\n\n  if (options.dev && typeof options.dev !== 'boolean') {\n    console.warn(\n      \"Warning: 'dev' is not a boolean which could introduce unexpected behavior. https://nextjs.org/docs/messages/invalid-server-options\"\n    )\n  }\n\n  // When the caller is a custom server (using next()).\n  if (options.customServer !== false) {\n    const dir = path.resolve(/* turbopackIgnore: true */ options.dir || '.')\n\n    return new NextCustomServer({\n      ...options,\n      dir,\n    })\n  }\n\n  // When the caller is Next.js internals (i.e. render worker, start server, etc)\n  return new NextServer(options)\n}\n","sourceCodeStart":655,"sourceCodeEnd":691,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/server/next.ts#L655-L691","documentation":"createServer validates its options: when the dev option is present but not a boolean (e.g. the string 'false', which is truthy), it warns that this could introduce unexpected behavior since truthiness checks will misinterpret the value.","triggerScenarios":"Thrown at packages/next/src/server/next.ts:673 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass `dev` as a boolean in the Next.js server options."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}