[{"data":1,"prerenderedAt":845},["ShallowReactive",2],{"navigation_docs":3,"-recipes-diagnostic-registry":60,"-recipes-diagnostic-registry-surround":840},[4,15,40,50],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10],{"title":11,"path":12,"stem":13,"icon":14},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F1.quick-start","i-lucide-rocket",{"title":16,"path":17,"stem":18,"children":19,"page":6},"Guide","\u002Fguide","2.guide",[20,25,30,35],{"title":21,"path":22,"stem":23,"icon":24},"Defining diagnostics","\u002Fguide\u002Fdefining-diagnostics","2.guide\u002F1.defining-diagnostics","i-lucide-list-tree",{"title":26,"path":27,"stem":28,"icon":29},"Reporters and formatters","\u002Fguide\u002Freporters-and-formatters","2.guide\u002F2.reporters-and-formatters","i-lucide-share-2",{"title":31,"path":32,"stem":33,"icon":34},"Production builds","\u002Fguide\u002Fproduction-builds","2.guide\u002F3.production-builds","i-lucide-scissors",{"title":36,"path":37,"stem":38,"icon":39},"Dev collector","\u002Fguide\u002Fdev-collector","2.guide\u002F4.dev-collector","i-lucide-terminal",{"title":41,"path":42,"stem":43,"children":44,"page":6},"Recipes","\u002Frecipes","3.recipes",[45],{"title":46,"path":47,"stem":48,"icon":49},"Diagnostic registry","\u002Frecipes\u002Fdiagnostic-registry","3.recipes\u002F1.diagnostic-registry","i-lucide-book-open",{"title":51,"path":52,"stem":53,"children":54,"page":6},"Api","\u002Fapi","4.api",[55],{"title":56,"path":57,"stem":58,"icon":59},"Reference","\u002Fapi\u002Freference","4.api\u002F1.reference","i-lucide-file-code",{"id":61,"title":46,"body":62,"description":833,"extension":834,"links":835,"meta":836,"navigation":837,"path":47,"seo":838,"stem":48,"__hash__":839},"docs\u002F3.recipes\u002F1.diagnostic-registry.md",{"type":63,"value":64,"toc":827},"minimark",[65,69,72,77,85,233,239,242,246,539,542,546,549,552,565,568,795,799,820,823],[66,67,68],"p",{},"A diagnostic code is most useful when it points to a page that explains the problem and the fix.",[66,70,71],{},"The page does not need to be long. It needs to be stable, readable without JavaScript, and consistent across codes.",[73,74,76],"h2",{"id":75},"pick-the-url-shape","Pick the URL shape",[66,78,79,80,84],{},"Use ",[81,82,83],"code",{},"docsBase"," to decide where code pages live. A function gives you full control over the URL.",[86,87,92],"pre",{"className":88,"code":89,"language":90,"meta":91,"style":91},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","defineDiagnostics({\n  docsBase: code => `https:\u002F\u002Fnuxt.com\u002Fe\u002F${code.replace('NUXT_', '').toLowerCase()}`,\n  codes: {\n    NUXT_B2011: { why: 'Plugin mode conflicts with file suffix.' },\n  },\n})\n","ts","",[81,93,94,111,179,191,218,224],{"__ignoreMap":91},[95,96,99,103,107],"span",{"class":97,"line":98},"line",1,[95,100,102],{"class":101},"s2Zo4","defineDiagnostics",[95,104,106],{"class":105},"sTEyZ","(",[95,108,110],{"class":109},"sMK4o","{\n",[95,112,114,117,120,124,128,131,135,138,140,143,146,148,151,154,156,159,162,165,167,170,173,176],{"class":97,"line":113},2,[95,115,116],{"class":101},"  docsBase",[95,118,119],{"class":109},":",[95,121,123],{"class":122},"sHdIc"," code",[95,125,127],{"class":126},"spNyl"," =>",[95,129,130],{"class":109}," `",[95,132,134],{"class":133},"sfazB","https:\u002F\u002Fnuxt.com\u002Fe\u002F",[95,136,137],{"class":109},"${",[95,139,81],{"class":105},[95,141,142],{"class":109},".",[95,144,145],{"class":101},"replace",[95,147,106],{"class":105},[95,149,150],{"class":109},"'",[95,152,153],{"class":133},"NUXT_",[95,155,150],{"class":109},[95,157,158],{"class":109},",",[95,160,161],{"class":109}," ''",[95,163,164],{"class":105},")",[95,166,142],{"class":109},[95,168,169],{"class":101},"toLowerCase",[95,171,172],{"class":105},"()",[95,174,175],{"class":109},"}`",[95,177,178],{"class":109},",\n",[95,180,182,186,188],{"class":97,"line":181},3,[95,183,185],{"class":184},"swJcz","  codes",[95,187,119],{"class":109},[95,189,190],{"class":109}," {\n",[95,192,194,197,199,202,205,207,210,213,215],{"class":97,"line":193},4,[95,195,196],{"class":184},"    NUXT_B2011",[95,198,119],{"class":109},[95,200,201],{"class":109}," {",[95,203,204],{"class":184}," why",[95,206,119],{"class":109},[95,208,209],{"class":109}," '",[95,211,212],{"class":133},"Plugin mode conflicts with file suffix.",[95,214,150],{"class":109},[95,216,217],{"class":109}," },\n",[95,219,221],{"class":97,"line":220},5,[95,222,223],{"class":109},"  },\n",[95,225,227,230],{"class":97,"line":226},6,[95,228,229],{"class":109},"}",[95,231,232],{"class":105},")\n",[66,234,235,236,142],{},"This creates ",[81,237,238],{},"https:\u002F\u002Fnuxt.com\u002Fe\u002Fb2011",[66,240,241],{},"Once published, keep the URL working. Logs and search results can outlive the release that emitted them.",[73,243,245],{"id":244},"page-template","Page template",[86,247,251],{"className":248,"code":249,"language":250,"meta":91,"style":91},"language-markdown shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# NUXT_B2011: Plugin mode conflicts with file suffix\n\nCode: `NUXT_B2011`\nLevel: error\n\n## What happened\n\nNuxt tried to register a plugin whose filename says it should run on one side, but whose `mode` says it should run on the other side.\n\n## How to fix it\n\nRemove `mode` and let the filename suffix decide:\n\n```ts [app\u002Fplugins\u002Fanalytics.server.ts]\nexport default defineNuxtPlugin(() => {\n  \u002F\u002F plugin code\n})\n```\n\n## Common causes\n\n- A plugin file was renamed from `.client.ts` to `.server.ts` without updating `mode`.\n- A module option switches the plugin mode but not the resolved file path.\n- A shared helper applies a default `mode` after the plugin path was already selected.\n\n## Example output\n\n```txt\n[NUXT_B2011] Plugin `.\u002Fruntime\u002Fanalytics.server.ts` is server-only but was registered with mode `client`.\n├▶ fix: Rename the file or register it with mode `server`.\n╰▶ see: https:\u002F\u002Fnuxt.com\u002Fe\u002Fb2011\n```\n","markdown",[81,252,253,262,268,282,287,291,299,304,320,325,333,338,353,358,368,389,396,403,409,414,422,427,465,473,490,495,503,508,516,522,528,534],{"__ignoreMap":91},[95,254,255,258],{"class":97,"line":98},[95,256,257],{"class":109},"# ",[95,259,261],{"class":260},"sBMFI","NUXT_B2011: Plugin mode conflicts with file suffix\n",[95,263,264],{"class":97,"line":113},[95,265,267],{"emptyLinePlaceholder":266},true,"\n",[95,269,270,273,276,279],{"class":97,"line":181},[95,271,272],{"class":105},"Code: ",[95,274,275],{"class":109},"`",[95,277,278],{"class":133},"NUXT_B2011",[95,280,281],{"class":109},"`\n",[95,283,284],{"class":97,"line":193},[95,285,286],{"class":105},"Level: error\n",[95,288,289],{"class":97,"line":220},[95,290,267],{"emptyLinePlaceholder":266},[95,292,293,296],{"class":97,"line":226},[95,294,295],{"class":109},"## ",[95,297,298],{"class":260},"What happened\n",[95,300,302],{"class":97,"line":301},7,[95,303,267],{"emptyLinePlaceholder":266},[95,305,307,310,312,315,317],{"class":97,"line":306},8,[95,308,309],{"class":105},"Nuxt tried to register a plugin whose filename says it should run on one side, but whose ",[95,311,275],{"class":109},[95,313,314],{"class":133},"mode",[95,316,275],{"class":109},[95,318,319],{"class":105}," says it should run on the other side.\n",[95,321,323],{"class":97,"line":322},9,[95,324,267],{"emptyLinePlaceholder":266},[95,326,328,330],{"class":97,"line":327},10,[95,329,295],{"class":109},[95,331,332],{"class":260},"How to fix it\n",[95,334,336],{"class":97,"line":335},11,[95,337,267],{"emptyLinePlaceholder":266},[95,339,341,344,346,348,350],{"class":97,"line":340},12,[95,342,343],{"class":105},"Remove ",[95,345,275],{"class":109},[95,347,314],{"class":133},[95,349,275],{"class":109},[95,351,352],{"class":105}," and let the filename suffix decide:\n",[95,354,356],{"class":97,"line":355},13,[95,357,267],{"emptyLinePlaceholder":266},[95,359,361,364],{"class":97,"line":360},14,[95,362,363],{"class":133},"```",[95,365,367],{"class":366},"sJsPd","ts [app\u002Fplugins\u002Fanalytics.server.ts]\n",[95,369,371,375,378,381,383,385,387],{"class":97,"line":370},15,[95,372,374],{"class":373},"s7zQu","export",[95,376,377],{"class":373}," default",[95,379,380],{"class":101}," defineNuxtPlugin",[95,382,106],{"class":105},[95,384,172],{"class":109},[95,386,127],{"class":126},[95,388,190],{"class":109},[95,390,392],{"class":97,"line":391},16,[95,393,395],{"class":394},"sHwdD","  \u002F\u002F plugin code\n",[95,397,399,401],{"class":97,"line":398},17,[95,400,229],{"class":109},[95,402,232],{"class":105},[95,404,406],{"class":97,"line":405},18,[95,407,408],{"class":133},"```\n",[95,410,412],{"class":97,"line":411},19,[95,413,267],{"emptyLinePlaceholder":266},[95,415,417,419],{"class":97,"line":416},20,[95,418,295],{"class":109},[95,420,421],{"class":260},"Common causes\n",[95,423,425],{"class":97,"line":424},21,[95,426,267],{"emptyLinePlaceholder":266},[95,428,430,433,436,438,441,443,446,448,451,453,456,458,460,462],{"class":97,"line":429},22,[95,431,432],{"class":109},"-",[95,434,435],{"class":105}," A plugin file was renamed from ",[95,437,275],{"class":109},[95,439,440],{"class":133},".client.ts",[95,442,275],{"class":109},[95,444,445],{"class":105}," to ",[95,447,275],{"class":109},[95,449,450],{"class":133},".server.ts",[95,452,275],{"class":109},[95,454,455],{"class":105}," without updating ",[95,457,275],{"class":109},[95,459,314],{"class":133},[95,461,275],{"class":109},[95,463,464],{"class":105},".\n",[95,466,468,470],{"class":97,"line":467},23,[95,469,432],{"class":109},[95,471,472],{"class":105}," A module option switches the plugin mode but not the resolved file path.\n",[95,474,476,478,481,483,485,487],{"class":97,"line":475},24,[95,477,432],{"class":109},[95,479,480],{"class":105}," A shared helper applies a default ",[95,482,275],{"class":109},[95,484,314],{"class":133},[95,486,275],{"class":109},[95,488,489],{"class":105}," after the plugin path was already selected.\n",[95,491,493],{"class":97,"line":492},25,[95,494,267],{"emptyLinePlaceholder":266},[95,496,498,500],{"class":97,"line":497},26,[95,499,295],{"class":109},[95,501,502],{"class":260},"Example output\n",[95,504,506],{"class":97,"line":505},27,[95,507,267],{"emptyLinePlaceholder":266},[95,509,511,513],{"class":97,"line":510},28,[95,512,363],{"class":133},[95,514,515],{"class":366},"txt\n",[95,517,519],{"class":97,"line":518},29,[95,520,521],{"class":366},"[NUXT_B2011] Plugin `.\u002Fruntime\u002Fanalytics.server.ts` is server-only but was registered with mode `client`.\n",[95,523,525],{"class":97,"line":524},30,[95,526,527],{"class":366},"├▶ fix: Rename the file or register it with mode `server`.\n",[95,529,531],{"class":97,"line":530},31,[95,532,533],{"class":366},"╰▶ see: https:\u002F\u002Fnuxt.com\u002Fe\u002Fb2011\n",[95,535,537],{"class":97,"line":536},32,[95,538,408],{"class":133},[66,540,541],{},"Keep the fix near the top. Most people arrive from an error message and want the next action.",[73,543,545],{"id":544},"keep-it-in-sync","Keep it in sync",[66,547,548],{},"The useful rule is simple: a new published code should ship with its docs page.",[66,550,551],{},"Common ways to enforce that:",[553,554,555,559,562],"ul",{},[556,557,558],"li",{},"Keep the markdown in the same repo as the diagnostic catalog.",[556,560,561],{},"Generate an index of all codes from the catalog.",[556,563,564],{},"Add a CI check that every code has a matching page.",[66,566,567],{},"Example check:",[86,569,571],{"className":88,"code":570,"language":90,"meta":91,"style":91},"import { existsSync } from 'node:fs'\nimport { diagnostics } from '..\u002Fsrc\u002Fdiagnostics'\n\nconst missing = Object.keys(diagnostics).filter((code) => {\n  return !existsSync(`docs\u002Ferrors\u002F${code.toLowerCase()}.md`)\n})\n\nif (missing.length > 0) {\n  console.error('Missing diagnostic docs:', missing.join(', '))\n  process.exit(1)\n}\n",[81,572,573,597,617,621,660,697,703,707,732,773,790],{"__ignoreMap":91},[95,574,575,578,580,583,586,589,591,594],{"class":97,"line":98},[95,576,577],{"class":373},"import",[95,579,201],{"class":109},[95,581,582],{"class":105}," existsSync",[95,584,585],{"class":109}," }",[95,587,588],{"class":373}," from",[95,590,209],{"class":109},[95,592,593],{"class":133},"node:fs",[95,595,596],{"class":109},"'\n",[95,598,599,601,603,606,608,610,612,615],{"class":97,"line":113},[95,600,577],{"class":373},[95,602,201],{"class":109},[95,604,605],{"class":105}," diagnostics",[95,607,585],{"class":109},[95,609,588],{"class":373},[95,611,209],{"class":109},[95,613,614],{"class":133},"..\u002Fsrc\u002Fdiagnostics",[95,616,596],{"class":109},[95,618,619],{"class":97,"line":181},[95,620,267],{"emptyLinePlaceholder":266},[95,622,623,626,629,632,635,637,640,643,645,648,650,652,654,656,658],{"class":97,"line":193},[95,624,625],{"class":126},"const",[95,627,628],{"class":105}," missing ",[95,630,631],{"class":109},"=",[95,633,634],{"class":105}," Object",[95,636,142],{"class":109},[95,638,639],{"class":101},"keys",[95,641,642],{"class":105},"(diagnostics)",[95,644,142],{"class":109},[95,646,647],{"class":101},"filter",[95,649,106],{"class":105},[95,651,106],{"class":109},[95,653,81],{"class":122},[95,655,164],{"class":109},[95,657,127],{"class":126},[95,659,190],{"class":109},[95,661,662,665,668,671,673,675,678,680,682,684,686,688,690,693,695],{"class":97,"line":220},[95,663,664],{"class":373},"  return",[95,666,667],{"class":109}," !",[95,669,670],{"class":101},"existsSync",[95,672,106],{"class":184},[95,674,275],{"class":109},[95,676,677],{"class":133},"docs\u002Ferrors\u002F",[95,679,137],{"class":109},[95,681,81],{"class":105},[95,683,142],{"class":109},[95,685,169],{"class":101},[95,687,172],{"class":105},[95,689,229],{"class":109},[95,691,692],{"class":133},".md",[95,694,275],{"class":109},[95,696,232],{"class":184},[95,698,699,701],{"class":97,"line":226},[95,700,229],{"class":109},[95,702,232],{"class":105},[95,704,705],{"class":97,"line":301},[95,706,267],{"emptyLinePlaceholder":266},[95,708,709,712,715,717,720,723,727,730],{"class":97,"line":306},[95,710,711],{"class":373},"if",[95,713,714],{"class":105}," (missing",[95,716,142],{"class":109},[95,718,719],{"class":105},"length ",[95,721,722],{"class":109},">",[95,724,726],{"class":725},"sbssI"," 0",[95,728,729],{"class":105},") ",[95,731,110],{"class":109},[95,733,734,737,739,742,744,746,749,751,753,756,758,761,763,765,768,770],{"class":97,"line":322},[95,735,736],{"class":105},"  console",[95,738,142],{"class":109},[95,740,741],{"class":101},"error",[95,743,106],{"class":184},[95,745,150],{"class":109},[95,747,748],{"class":133},"Missing diagnostic docs:",[95,750,150],{"class":109},[95,752,158],{"class":109},[95,754,755],{"class":105}," missing",[95,757,142],{"class":109},[95,759,760],{"class":101},"join",[95,762,106],{"class":184},[95,764,150],{"class":109},[95,766,767],{"class":133},", ",[95,769,150],{"class":109},[95,771,772],{"class":184},"))\n",[95,774,775,778,780,783,785,788],{"class":97,"line":327},[95,776,777],{"class":105},"  process",[95,779,142],{"class":109},[95,781,782],{"class":101},"exit",[95,784,106],{"class":184},[95,786,787],{"class":725},"1",[95,789,232],{"class":184},[95,791,792],{"class":97,"line":335},[95,793,794],{"class":109},"}\n",[73,796,798],{"id":797},"make-pages-easy-to-consume","Make pages easy to consume",[553,800,801,804,807,810,813],{},[556,802,803],{},"Render the content in the initial HTML.",[556,805,806],{},"Include the code in the title and body.",[556,808,809],{},"Use the same section names on every page.",[556,811,812],{},"Keep examples self-contained.",[556,814,815,816,819],{},"Return ",[81,817,818],{},"404"," for unknown codes.",[66,821,822],{},"This helps humans, search engines, and tools that fetch the URL from a log.",[824,825,826],"style",{},"html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sJsPd, html code.shiki .sJsPd{--shiki-light:#90A4AE90;--shiki-default:#EEFFFF90;--shiki-dark:#BABED890}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":91,"searchDepth":113,"depth":113,"links":828},[829,830,831,832],{"id":75,"depth":113,"text":76},{"id":244,"depth":113,"text":245},{"id":544,"depth":113,"text":545},{"id":797,"depth":113,"text":798},"Publish stable docs pages for diagnostic codes.","md",null,{},{"icon":49},{"title":46,"description":833},"pKT2lIAxcJuD7i7FfEmFxNBtBlsz61VZfM4zlWeseGo",[841,843],{"title":36,"path":37,"stem":38,"description":842,"icon":39,"children":-1},"Forward browser diagnostics from Vite dev to a local log file.",{"title":56,"path":57,"stem":58,"description":844,"icon":59,"children":-1},"API reference for nostics core exports, reporters, formatters, and plugins.",1781110594583]