[{"data":1,"prerenderedAt":352,"buildId":353},["ShallowReactive",2],{"diagnostic-content-H30019":3,"navigation_docs":251},{"id":4,"title":5,"body":6,"category":12,"code":241,"description":242,"docsUrl":13,"extension":243,"fix":244,"framework":55,"meta":245,"navigation":246,"pack":15,"path":247,"ruleId":16,"rulePath":17,"seo":248,"severity":18,"source":19,"sourceUrl":20,"stem":249,"why":29,"__hash__":250},"diagnostics\u002Fdiagnostics\u002FH30019.md","H30019: Replace router APIs H3 v2 removed",{"type":7,"value":8,"toc":231},"minimark",[9,21,26,30,34,50,54,59,62,138,141,167,171,174,199,203,215,219,227],[10,11],"rule-metadata",{"category":12,"docsUrl":13,"fix":14,"pack":15,"ruleId":16,"rulePath":17,"severity":18,"source":19,"sourceUrl":20},"migration","https:\u002F\u002Fgithub.com\u002Fh3js\u002Fh3\u002Fblob\u002Fmain\u002FMIGRATION.md","suggestion","vite-doctor\u002Fh3","h3\u002Fmigration\u002Fno-removed-router-api","\u002Fh3\u002Frules\u002Fmigration\u002Fno-removed-router-api","error","src\u002Frule-packs\u002Fh3\u002Frules\u002Fno-removed-router-api.ts","https:\u002F\u002Fgithub.com\u002Fwords-with-agents\u002Fvite-doctor\u002Fblob\u002Fmain\u002Fsrc\u002Frule-packs\u002Fh3\u002Frules\u002Fno-removed-router-api.ts",[22,23,25],"h2",{"id":24},"why-it-happens","Why it happens",[27,28,29],"p",{},"H3 v2 merged the router into the app. The removed members are undefined at runtime, so a call throws when the route module loads and the server fails to start.",[22,31,33],{"id":32},"fix","Fix",[27,35,36,37,41,42,45,46,49],{},"Register routes with app.",[38,39,40],"code",{},"on(method, path, handler)"," or app.",[38,43,44],{},"get(path, handler)",", register each path separately, and wrap lazy handlers with ",[38,47,48],{},"defineLazyEventHandler()",".",[22,51,53],{"id":52},"example","Example",[55,56,58],"h3",{"id":57},"register-routes-on-the-app","Register routes on the app",[27,60,61],{},"Before",[63,64,69],"pre",{"className":65,"code":66,"language":67,"meta":68,"style":68},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const router = createRouter()\nrouter.add(\"\u002Fitems\", listItems)\napp.use(router)\n","ts","",[38,70,71,95,124],{"__ignoreMap":68},[72,73,76,80,84,88,92],"span",{"class":74,"line":75},"line",1,[72,77,79],{"class":78},"spNyl","const",[72,81,83],{"class":82},"sTEyZ"," router ",[72,85,87],{"class":86},"sMK4o","=",[72,89,91],{"class":90},"s2Zo4"," createRouter",[72,93,94],{"class":82},"()\n",[72,96,98,101,103,106,109,112,116,118,121],{"class":74,"line":97},2,[72,99,100],{"class":82},"router",[72,102,49],{"class":86},[72,104,105],{"class":90},"add",[72,107,108],{"class":82},"(",[72,110,111],{"class":86},"\"",[72,113,115],{"class":114},"sfazB","\u002Fitems",[72,117,111],{"class":86},[72,119,120],{"class":86},",",[72,122,123],{"class":82}," listItems)\n",[72,125,127,130,132,135],{"class":74,"line":126},3,[72,128,129],{"class":82},"app",[72,131,49],{"class":86},[72,133,134],{"class":90},"use",[72,136,137],{"class":82},"(router)\n",[27,139,140],{},"After",[63,142,144],{"className":65,"code":143,"language":67,"meta":68,"style":68},"app.get(\"\u002Fitems\", listItems)\n",[38,145,146],{"__ignoreMap":68},[72,147,148,150,152,155,157,159,161,163,165],{"class":74,"line":75},[72,149,129],{"class":82},[72,151,49],{"class":86},[72,153,154],{"class":90},"get",[72,156,108],{"class":82},[72,158,111],{"class":86},[72,160,115],{"class":114},[72,162,111],{"class":86},[72,164,120],{"class":86},[72,166,123],{"class":82},[22,168,170],{"id":169},"verify-the-fix","Verify the fix",[27,172,173],{},"Run only this rule after editing so the report stays focused on the diagnostic you are closing:",[63,175,179],{"className":176,"code":177,"language":178,"meta":68,"style":68},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm vite-doctor . --rules h3\u002Fmigration\u002Fno-removed-router-api\n","bash",[38,180,181],{"__ignoreMap":68},[72,182,183,187,190,193,196],{"class":74,"line":75},[72,184,186],{"class":185},"sBMFI","pnpm",[72,188,189],{"class":114}," vite-doctor",[72,191,192],{"class":114}," .",[72,194,195],{"class":114}," --rules",[72,197,198],{"class":114}," h3\u002Fmigration\u002Fno-removed-router-api\n",[22,200,202],{"id":201},"useful-links","Useful links",[204,205,206],"ul",{},[207,208,209],"li",{},[210,211,214],"a",{"href":13,"rel":212},[213],"nofollow","Upstream docs",[22,216,218],{"id":217},"related-rule","Related rule",[204,220,221],{},[207,222,223],{},[210,224,225],{"href":17},[38,226,16],{},[228,229,230],"style",{},"html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}",{"title":68,"searchDepth":97,"depth":97,"links":232},[233,234,235,238,239,240],{"id":24,"depth":97,"text":25},{"id":32,"depth":97,"text":33},{"id":52,"depth":97,"text":53,"children":236},[237],{"id":57,"depth":126,"text":58},{"id":169,"depth":97,"text":170},{"id":201,"depth":97,"text":202},{"id":217,"depth":97,"text":218},"H30019","Flags router.add(), router.resolve(), app.stack, lazy handlers registered with { lazy: true }, and array route paths, which H3 v2 removed.","md","Register routes with app.on(method, path, handler) or app.get(path, handler), register each path separately, and wrap lazy handlers with defineLazyEventHandler().",{},true,"\u002Fdiagnostics\u002Fh30019",{"title":5,"description":242},"diagnostics\u002FH30019","F0_QHdCeQG-a25jjsj90E5AaZKOCvTJyuUVzI7C0FyU",[252,280,284,288,292,296,300,312,316,340,344,348],{"title":253,"path":254,"stem":255,"children":256,"icon":279},"CLI","\u002Fcli","1.cli\u002F1.index",[257,259,263,267,271,275],{"title":258,"path":254,"stem":255},"Run Doctor",{"title":260,"path":261,"stem":262},"Reports","\u002Fcli\u002Freports","1.cli\u002F2.reports",{"title":264,"path":265,"stem":266},"Configuration","\u002Fcli\u002Fconfiguration","1.cli\u002F3.configuration",{"title":268,"path":269,"stem":270},"CI and changed files","\u002Fcli\u002Fci","1.cli\u002F4.ci",{"title":272,"path":273,"stem":274},"Workspaces","\u002Fcli\u002Fworkspaces","1.cli\u002F5.workspaces",{"title":276,"path":277,"stem":278},"Cache and speed","\u002Fcli\u002Fcache","1.cli\u002F6.cache","i-lucide-terminal",{"title":281,"path":282,"stem":283},"Nuxt","\u002Fnuxt","2.nuxt",{"title":285,"path":286,"stem":287},"Vue","\u002Fvue","3.vue",{"title":289,"path":290,"stem":291},"Vite","\u002Fvite","4.vite",{"title":293,"path":294,"stem":295},"Nitro","\u002Fnitro","5.nitro",{"title":297,"path":298,"stem":299},"TypeScript","\u002Ftypescript","6.typescript",{"title":301,"path":302,"stem":303,"children":304,"icon":311},"Design system","\u002Fdesign-system","7.design-system\u002F1.index",[305,307],{"title":306,"path":302,"stem":303},"Overview",{"title":308,"path":309,"stem":310},"Classes and styles","\u002Fdesign-system\u002Fclasses","7.design-system\u002F2.classes","i-lucide-swatch-book",{"title":313,"path":314,"stem":315},"Package","\u002Fpackage","8.package",{"title":317,"path":318,"stem":319,"children":320,"icon":339},"Extending Doctor","\u002Fextending","9.extending\u002F1.index",[321,323,327,331,335],{"title":322,"path":318,"stem":319},"Write an extension",{"title":324,"path":325,"stem":326},"Visitors","\u002Fextending\u002Fvisitors","9.extending\u002F2.visitors",{"title":328,"path":329,"stem":330},"Ship with a library","\u002Fextending\u002Fshipping","9.extending\u002F3.shipping",{"title":332,"path":333,"stem":334},"Test a Rule","\u002Fextending\u002Ftesting","9.extending\u002F4.testing",{"title":336,"path":337,"stem":338},"Rule inputs","\u002Fextending\u002Frule-inputs","9.extending\u002F5.rule-inputs","i-lucide-puzzle",{"title":341,"path":342,"stem":343},"H3","\u002Fh3","9.h3",{"title":345,"path":346,"stem":347},"MCP","\u002Fmodel-context-protocol","9.model-context-protocol",{"title":349,"path":350,"stem":351},"Pinia","\u002Fpinia","9.pinia",1796507784727,"e745db9b-2064-477e-b678-8c0a05edc39c"]