[{"data":1,"prerenderedAt":400,"buildId":401},["ShallowReactive",2],{"diagnostic-content-NUXT0100":3,"navigation_docs":299},{"id":4,"title":5,"body":6,"category":12,"code":287,"description":288,"docsUrl":13,"extension":289,"fix":290,"framework":291,"meta":292,"navigation":293,"pack":15,"path":294,"ruleId":16,"rulePath":17,"seo":295,"severity":18,"source":19,"sourceUrl":20,"stem":296,"why":297,"__hash__":298},"diagnostics\u002Fdiagnostics\u002FNUXT0100.md","NUXT0100: Give transitioned pages and layouts a single root node",{"type":7,"value":8,"toc":277},"minimark",[9,21,26,46,50,57,61,66,69,144,147,212,216,219,245,249,261,265,273],[10,11],"rule-metadata",{"category":12,"docsUrl":13,"fix":14,"pack":15,"ruleId":16,"rulePath":17,"severity":18,"source":19,"sourceUrl":20},"correctness","https:\u002F\u002Fnuxt.com\u002Fdocs\u002F4.x\u002Fgetting-started\u002Ftransitions","suggestion","vite-doctor\u002Fnuxt","nuxt\u002Fpages\u002Fsingle-root-node","\u002Fnuxt\u002Frules\u002Fpages\u002Fsingle-root-node","warn","src\u002Frule-packs\u002Fnuxt\u002Frules\u002Fnuxt\u002Fsingle-root-node.ts","https:\u002F\u002Fgithub.com\u002Fwords-with-agents\u002Fvite-doctor\u002Fblob\u002Fmain\u002Fsrc\u002Frule-packs\u002Fnuxt\u002Frules\u002Fnuxt\u002Fsingle-root-node.ts",[22,23,25],"h2",{"id":24},"why-it-happens","Why it happens",[27,28,29,30,34,35,37,38,41,42,45],"p",{},"Nuxt wraps pages in a ",[31,32,33],"code",{},"\u003CTransition>"," when a page transition is on, and layouts when a layout transition is on. A ",[31,36,33],{}," can only animate a single element, so a page with several root nodes, or a text root, does not animate when you navigate to or from it. Vue keeps template comments in development, so a comment next to the root element also turns the page into a fragment there. Nuxt reports this in development as NUXT_E4004 for pages and NUXT_E4002 for layouts. Both are off by default (",[31,39,40],{},"app.pageTransition"," and ",[31,43,44],{},"app.layoutTransition"," default to false), so pages without a transition are not reported.",[22,47,49],{"id":48},"fix","Fix",[27,51,52,53,56],{},"Wrap the template in a single root element, such as a ",[31,54,55],{},"\u003Cdiv>",", and move comments inside it.",[22,58,60],{"id":59},"example","Example",[62,63,65],"h3",{"id":64},"give-a-transitioned-page-one-root-element","Give a transitioned page one root element",[27,67,68],{},"Before",[70,71,76],"pre",{"className":72,"code":73,"language":74,"meta":75,"style":75},"language-vue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003C!-- nuxt.config.ts sets app: { pageTransition: { name: 'page' } } -->\n\u003Ctemplate>\n  \u003Ch1>Users\u003C\u002Fh1>\n  \u003CUserList \u002F>\n\u003C\u002Ftemplate>\n","vue","",[31,77,78,87,101,124,135],{"__ignoreMap":75},[79,80,83],"span",{"class":81,"line":82},"line",1,[79,84,86],{"class":85},"sHwdD","\u003C!-- nuxt.config.ts sets app: { pageTransition: { name: 'page' } } -->\n",[79,88,90,94,98],{"class":81,"line":89},2,[79,91,93],{"class":92},"sMK4o","\u003C",[79,95,97],{"class":96},"swJcz","template",[79,99,100],{"class":92},">\n",[79,102,104,107,110,113,117,120,122],{"class":81,"line":103},3,[79,105,106],{"class":92},"  \u003C",[79,108,109],{"class":96},"h1",[79,111,112],{"class":92},">",[79,114,116],{"class":115},"sTEyZ","Users",[79,118,119],{"class":92},"\u003C\u002F",[79,121,109],{"class":96},[79,123,100],{"class":92},[79,125,127,129,132],{"class":81,"line":126},4,[79,128,106],{"class":92},[79,130,131],{"class":96},"UserList",[79,133,134],{"class":92}," \u002F>\n",[79,136,138,140,142],{"class":81,"line":137},5,[79,139,119],{"class":92},[79,141,97],{"class":96},[79,143,100],{"class":92},[27,145,146],{},"After",[70,148,150],{"className":72,"code":149,"language":74,"meta":75,"style":75},"\u003Ctemplate>\n  \u003Cdiv>\n    \u003Ch1>Users\u003C\u002Fh1>\n    \u003CUserList \u002F>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n",[31,151,152,160,169,186,194,203],{"__ignoreMap":75},[79,153,154,156,158],{"class":81,"line":82},[79,155,93],{"class":92},[79,157,97],{"class":96},[79,159,100],{"class":92},[79,161,162,164,167],{"class":81,"line":89},[79,163,106],{"class":92},[79,165,166],{"class":96},"div",[79,168,100],{"class":92},[79,170,171,174,176,178,180,182,184],{"class":81,"line":103},[79,172,173],{"class":92},"    \u003C",[79,175,109],{"class":96},[79,177,112],{"class":92},[79,179,116],{"class":115},[79,181,119],{"class":92},[79,183,109],{"class":96},[79,185,100],{"class":92},[79,187,188,190,192],{"class":81,"line":126},[79,189,173],{"class":92},[79,191,131],{"class":96},[79,193,134],{"class":92},[79,195,196,199,201],{"class":81,"line":137},[79,197,198],{"class":92},"  \u003C\u002F",[79,200,166],{"class":96},[79,202,100],{"class":92},[79,204,206,208,210],{"class":81,"line":205},6,[79,207,119],{"class":92},[79,209,97],{"class":96},[79,211,100],{"class":92},[22,213,215],{"id":214},"verify-the-fix","Verify the fix",[27,217,218],{},"Run only this rule after editing so the report stays focused on the diagnostic you are closing:",[70,220,224],{"className":221,"code":222,"language":223,"meta":75,"style":75},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm nuxt doctor --rules nuxt\u002Fpages\u002Fsingle-root-node\n","bash",[31,225,226],{"__ignoreMap":75},[79,227,228,232,236,239,242],{"class":81,"line":82},[79,229,231],{"class":230},"sBMFI","pnpm",[79,233,235],{"class":234},"sfazB"," nuxt",[79,237,238],{"class":234}," doctor",[79,240,241],{"class":234}," --rules",[79,243,244],{"class":234}," nuxt\u002Fpages\u002Fsingle-root-node\n",[22,246,248],{"id":247},"useful-links","Useful links",[250,251,252],"ul",{},[253,254,255],"li",{},[256,257,260],"a",{"href":13,"rel":258},[259],"nofollow","Upstream docs",[22,262,264],{"id":263},"related-rule","Related rule",[250,266,267],{},[253,268,269],{},[256,270,271],{"href":17},[31,272,16],{},[274,275,276],"style",{},"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}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}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}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}",{"title":75,"searchDepth":89,"depth":89,"links":278},[279,280,281,284,285,286],{"id":24,"depth":89,"text":25},{"id":48,"depth":89,"text":49},{"id":59,"depth":89,"text":60,"children":282},[283],{"id":64,"depth":103,"text":65},{"id":214,"depth":89,"text":215},{"id":247,"depth":89,"text":248},{"id":263,"depth":89,"text":264},"NUXT0100","Finds pages and layouts with multiple roots, or a text or comment root, when a transition applies on a known route. Doctor checks the reachable `\u003CNuxtPage>` outlet, matched route metadata, and app defaults in Nuxt's precedence order. It checks only registered layouts it can associate with a `\u003CNuxtLayout>` outlet and a transition. A `v-if`\u002F`v-else-if`\u002F`v-else` chain counts as one root; runtime-dependent transitions and lone `\u003Cslot>` roots are not reported.","md","Wrap the template in a single root element, such as a `\u003Cdiv>`, and move comments inside it.","nuxt",{},true,"\u002Fdiagnostics\u002Fnuxt0100",{"title":5,"description":288},"diagnostics\u002FNUXT0100","Nuxt wraps pages in a `\u003CTransition>` when a page transition is on, and layouts when a layout transition is on. A `\u003CTransition>` can only animate a single element, so a page with several root nodes, or a text root, does not animate when you navigate to or from it. Vue keeps template comments in development, so a comment next to the root element also turns the page into a fragment there. Nuxt reports this in development as NUXT_E4004 for pages and NUXT_E4002 for layouts. Both are off by default (`app.pageTransition` and `app.layoutTransition` default to false), so pages without a transition are not reported.","2usm1dVogXo2Ocvq-MXBX2-8Vy-sqMzb-qpiJIMmexg",[300,328,332,336,340,344,348,360,364,388,392,396],{"title":301,"path":302,"stem":303,"children":304,"icon":327},"CLI","\u002Fcli","1.cli\u002F1.index",[305,307,311,315,319,323],{"title":306,"path":302,"stem":303},"Run Doctor",{"title":308,"path":309,"stem":310},"Reports","\u002Fcli\u002Freports","1.cli\u002F2.reports",{"title":312,"path":313,"stem":314},"Configuration","\u002Fcli\u002Fconfiguration","1.cli\u002F3.configuration",{"title":316,"path":317,"stem":318},"CI and changed files","\u002Fcli\u002Fci","1.cli\u002F4.ci",{"title":320,"path":321,"stem":322},"Workspaces","\u002Fcli\u002Fworkspaces","1.cli\u002F5.workspaces",{"title":324,"path":325,"stem":326},"Cache and speed","\u002Fcli\u002Fcache","1.cli\u002F6.cache","i-lucide-terminal",{"title":329,"path":330,"stem":331},"Nuxt","\u002Fnuxt","2.nuxt",{"title":333,"path":334,"stem":335},"Vue","\u002Fvue","3.vue",{"title":337,"path":338,"stem":339},"Vite","\u002Fvite","4.vite",{"title":341,"path":342,"stem":343},"Nitro","\u002Fnitro","5.nitro",{"title":345,"path":346,"stem":347},"TypeScript","\u002Ftypescript","6.typescript",{"title":349,"path":350,"stem":351,"children":352,"icon":359},"Design system","\u002Fdesign-system","7.design-system\u002F1.index",[353,355],{"title":354,"path":350,"stem":351},"Overview",{"title":356,"path":357,"stem":358},"Classes and styles","\u002Fdesign-system\u002Fclasses","7.design-system\u002F2.classes","i-lucide-swatch-book",{"title":361,"path":362,"stem":363},"Package","\u002Fpackage","8.package",{"title":365,"path":366,"stem":367,"children":368,"icon":387},"Extending Doctor","\u002Fextending","9.extending\u002F1.index",[369,371,375,379,383],{"title":370,"path":366,"stem":367},"Write an extension",{"title":372,"path":373,"stem":374},"Visitors","\u002Fextending\u002Fvisitors","9.extending\u002F2.visitors",{"title":376,"path":377,"stem":378},"Ship with a library","\u002Fextending\u002Fshipping","9.extending\u002F3.shipping",{"title":380,"path":381,"stem":382},"Test a Rule","\u002Fextending\u002Ftesting","9.extending\u002F4.testing",{"title":384,"path":385,"stem":386},"Rule inputs","\u002Fextending\u002Frule-inputs","9.extending\u002F5.rule-inputs","i-lucide-puzzle",{"title":389,"path":390,"stem":391},"H3","\u002Fh3","9.h3",{"title":393,"path":394,"stem":395},"MCP","\u002Fmodel-context-protocol","9.model-context-protocol",{"title":397,"path":398,"stem":399},"Pinia","\u002Fpinia","9.pinia",1796507791037,"e745db9b-2064-477e-b678-8c0a05edc39c"]