to app.vue\n8. start the project via npm run dev\n9. open created localhost link in browser\n[Minimal reproduction link](https://stackblitz.com/edit/github-dksvnc-l71vra)\n\n### Describe the bug\n\nRunning in development mode (and shortly seems to be an issue for production build also) and opening app in browser leads to error in Vue Router. You can still get it work by redirecting to other path by clicking the link to another page, but the error will return after page refresh which is extremely uncomfartable for local work\n\nSetting ssr: false in nuxt.config.ts solves this issue, but we need ssr: true for the project\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n[Vue Router warn]: uncaught error during route navigation:\nCannot destructure property '__webpack_ids__' of 'data' as it is undefined.\n\n at installChunk (node_modules\\nuxt\\dist\\core\\runtime\\nitro\\renderer.js:525:1)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Promise.all (index 0)\n at setup (node_modules\\nuxt\\dist\\core\\runtime\\nitro\\renderer.js:525:1)\n at applyPlugin (node_modules\\nuxt\\dist\\core\\runtime\\nitro\\renderer.js:525:1)\n at executePlugin (node_modules\\nuxt\\dist\\core\\runtime\\nitro\\renderer.js:525:1)\n at applyPlugins (node_modules\\nuxt\\dist\\core\\runtime\\nitro\\renderer.js:525:1)\n at createNuxtAppServer (node_modules\\nuxt\\dist\\core\\runtime\\nitro\\renderer.js:525:1)\n at async Object.renderToString (/D:/dev/text-nuxt/node_modules/vue-bundle-renderer/dist/runtime.mjs:173:19)\n```",[1984,1987,1990],{"name":1985,"color":1986},"bug","d73a4a",{"name":1988,"color":1989},"webpack","650C6F",{"name":1991,"color":1992},"❗ p4-important","D93F0B",30165,"nuxt","open","[Vue Router warn]: uncaught error during route navigation when building with webpack","2024-12-17T06:37:23Z","https://github.com/nuxt/nuxt/issues/30165",0.6417762,{"labels":2001,"number":2002,"owner":1994,"repository":1994,"state":2003,"title":2004,"updated_at":2005,"url":2006,"score":2007},[],13198,"closed","Production build + custom vue lib + ssr","2023-01-19T16:48:28Z","https://github.com/nuxt/nuxt/issues/13198",0.47863054,{"description":2009,"labels":2010,"number":2017,"owner":1994,"repository":1994,"state":2003,"title":2018,"updated_at":2019,"url":2020,"score":2021},"### Environment\r\n\r\n- Operating System: Linux\r\n- Node Version: v18.18.0\r\n- Nuxt Version: 3.8.2\r\n- CLI Version: 3.10.0\r\n- Nitro Version: 2.8.0\r\n- Package Manager: npm@9.4.2\r\n- Builder: -\r\n- User Config: devtools\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/nuxt-starter-4byrfr?file=modules%2Fcode-block.ts,app.vue\r\n\r\n### Describe the bug\r\n\r\nI have installed a vue component from NPM and created a nuxt module for it:\r\n\r\n```javascript\r\nimport { defineNuxtModule, addComponent } from '@nuxt/kit'\r\n\r\nexport default defineNuxtModule({\r\n setup() {\r\n addComponent({\r\n name: 'VCodeBlock',\r\n export: 'VCodeBlock',\r\n filePath: '@wdns/vue-code-block',\r\n mode: \"client\",\r\n })\r\n },\r\n})\r\n```\r\n\r\nHowever, despite `mode: \"client\"` whenever I put it in a nuxt page, layout or component I still get an ssr related issue\r\n\r\n```\r\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.\r\n[Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n```\r\nI also have the same error if I just import the component without using nuxt modules \r\nIf I completely disable SSR, it works fine. \r\n\r\nIf I remove mode client, it's worse : it says window is undefined\r\n\r\nI would assume the problem is that the module is client side... but the component use it in isn't, therefore it's rendered before it should. \r\n\r\nIt does feel like a bug however because you'd assume mode client would work. What does `mode:client` do exactly ? \r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n```shell-script\r\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.\r\n[Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n```\r\n",[2011,2014],{"name":2012,"color":2013},"3.x","29bc7f",{"name":2015,"color":2016},"pending triage","E99695",24478,"node_modules component in nuxt modules : I still get SSR related errors despite `mode:client`","2023-11-28T23:34:19Z","https://github.com/nuxt/nuxt/issues/24478",0.6283897,{"labels":2023,"number":2031,"owner":1994,"repository":1994,"state":2003,"title":2032,"updated_at":2033,"url":2034,"score":2035},[2024,2027,2028],{"name":2025,"color":2026},"stale","ffffff",{"name":2015,"color":2016},{"name":2029,"color":2030},"2.x","d4c5f9",7500,"Bad SSR in installed components that are building by vue-cli-service ","2023-01-22T15:36:01Z","https://github.com/nuxt/nuxt/issues/7500",0.63242835,{"description":2037,"labels":2038,"number":2046,"owner":1994,"repository":1994,"state":2003,"title":2047,"updated_at":2048,"url":2049,"score":2050},"### Environment\n\n------------------------------\n- Operating System: Linux\n- Node Version: v20.15.1\n- Nuxt Version: 3.13.2\n- CLI Version: 3.13.2\n- Nitro Version: 2.9.7\n- Package Manager: npm@10.7.0\n- Builder: -\n- User Config: ssr, devtools, build, vite, vue, hooks, css, components, runtimeConfig, router, ignore, app, site, robots, routeRules, ogImage, schemaOrg, icon, postcss, nitro, modules, vitalizer, pwa, ui\n- Runtime Modules: @nuxt/ui@2.18.7, @nuxtjs/device@3.2.4, @vueuse/nuxt@11.1.0, @pinia/nuxt@0.5.5, @nuxtjs/seo@2.0.0-rc.18, @vite-pwa/nuxt@0.10.5, nuxt-vitalizer@0.10.0\n- Build Modules: -\n------------------------------\n\n### Reproduction\n\nNot sure how to provide a reproduction since the issue only appears once i build my app.\n\n### Describe the bug\n\nI need to render dynamic templates on the server. For this I have set `vue.runtimeCompiler: true` inside the nuxt config. I also have written a simple `RenderTemplate.vue` component that gets passed a template string and renders the appropriate content.\n\n```ts\n\u003Cscript setup lang=\"ts\">\n // Custom components we allow to render\n import {\n KlzAudio,\n // Tuncated full list...\n } from '#components';\n\n interface Props {\n template: string;\n // eslint-disable-next-line\n options?: any;\n }\n\n const props = withDefaults(defineProps\u003CProps>(), {\n options: {}\n });\n\n const compiledTemplate = computed(() => {\n return defineComponent({\n components: {\n KlzAudio,\n // Tuncated full list...\n },\n props: {\n options: {\n type: Object,\n default: () => ({})\n }\n },\n template: props.template\n });\n });\n\u003C/script>\n\n\u003Ctemplate>\n \u003Cdiv>\n \u003Ccomponent\n :is=\"compiledTemplate\"\n ref=\"compRef\"\n :options=\"props.options\"\n >\u003C/component>\n \u003C/div>\n\u003C/template>\n```\n\nThis works just fine in development mode or when I build using `ssr: false`. In development I have no issues also with `ssr: true` everything works as expected and If I inspect the source code of the pages where I use the `RenderTemplate` component I also see the rendered HTML just fine. But when I build my app using `npx nuxi build --preset=cloudflare_pages` and try to run the server I get:\n\n```\nOn-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.\n```\n\nUPDATE: This only happens if i use the `cloudflare_pages` preset with `node-server` it works just fine.\n\nI have only found one other issue that mentioned this exact error: https://github.com/nuxt/nuxt/issues/13358\n\nSadly the fix suggested does not work in my scenario since I render more complex components and would get other errors related to not being in the nuxt context using `renderString()`.\n\nI also found that using `render` instead of `template` together with `compile` resolves the \"on-the-fly\" error but when looking at the source of my page the dynamically rendered content is not part of the HTML rendered on the server which is a big issue.\n\nResolves initial error but does not render HTML content on the server:\n```ts\nconst compiledTemplate = computed(() => {\n return defineComponent({\n components: {\n KlzAudio,\n // Truncated full list...\n },\n props: {\n options: {\n type: Object,\n default: () => ({})\n }\n },\n render: compile(props.template)\n });\n});\n```\n\nHow can I fix this issues? Why is it working in dev but not when building the app? \n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2039,2040,2043],{"name":2015,"color":2016},{"name":2041,"color":2042},"needs reproduction","FBCA04",{"name":2044,"color":2045},"closed-by-bot","ededed",29769,"On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer.","2024-11-11T02:00:16Z","https://github.com/nuxt/nuxt/issues/29769",0.6368038,{"labels":2052,"number":2060,"owner":1994,"repository":1994,"state":2003,"title":2061,"updated_at":2062,"url":2063,"score":2064},[2053,2054,2055,2058],{"name":2012,"color":2013},{"name":1985,"color":1986},{"name":2056,"color":2057},"vite","3574D1",{"name":2059,"color":2042},"🔨 p3-minor",13642,"Bug: `throwError` on SSR is giving different DX","2023-01-19T17:02:42Z","https://github.com/nuxt/nuxt/issues/13642",0.6391228,{"description":2066,"labels":2067,"number":2071,"owner":1994,"repository":1994,"state":2003,"title":2072,"updated_at":2073,"url":2074,"score":2075},"### Environment\n\nNuxi 3.0.0-rc.9 00:30:28\r\nRootDir: /home/user/workspace/my-app 00:30:29\r\nNuxt project info: 00:30:29\r\n\r\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.17.0`\r\n- Nuxt Version: `3.0.0-rc.10-27716896.3753ea0`\r\n- Nitro Version: `0.5.1`\r\n- Package Manager: `yarn@3.2.3`\r\n- Builder: `vite`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\r\n\r\n\r\nFor some reason the Build Modules and Runtime Modules are not shown here\n\n### Reproduction\n\nThe cause of the problem is the ssr flag. As soon as this is set to true, the error occurs.\r\n\r\n```\r\nexport default defineNuxtConfig({\r\n ssr: true,\r\n nitro: {\r\n preset: \"netlify\",\r\n prerender: {\r\n routes: [\r\n '/blog'\r\n ]\r\n }\r\n },\r\n vueuse: {\r\n ssrHandlers: true,\r\n },\r\n\r\n imports: {\r\n autoImport: true\r\n },\r\n\r\n components: {\r\n global: true,\r\n dirs: ['~/components']\r\n },\r\n\r\n build: {\r\n transpile: [\r\n '@nuxt/content',\r\n '@headlessui/vue',\r\n 'vue-svg-inline-plugin',\r\n ],\r\n },\r\n\r\n modules: [\r\n '@nuxtjs/tailwindcss',\r\n \"nuxt-directus\",\r\n '@nuxtjs/eslint-module',\r\n 'unplugin-icons/nuxt',\r\n '@nuxtjs/svg',\r\n '@vueuse/nuxt',\r\n '@nuxt/content',\r\n '@pinia/nuxt'\r\n ],\r\n\r\n}\r\n```\n\n### Describe the bug\n\nBuild failing when ssr setting is set to true\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\nℹ Initializing prerenderer\r\n\r\n ERROR \r\n\r\nundefined\r\n\r\n\r\n ERROR Could not load /home/user/workspace/my-app/.nuxt/dist/server/styles.mjs (imported by ../../../node_modules/nuxt/dist/core/runtime/nitro/renderer.mjs): ENOENT: no such file or directory, open '/home/user/workspace/my-app/.nuxt/dist/server/styles.mjs'\r\n\r\n\r\n\r\n\r\n```\n```\n",[2068,2069,2070],{"name":2012,"color":2013},{"name":2015,"color":2016},{"name":2041,"color":2042},14887,"ssr:true causing \".nuxt/dist/server/styles.mjs\"","2023-01-19T17:41:56Z","https://github.com/nuxt/nuxt/issues/14887",0.6393679,{"description":2077,"labels":2078,"number":2082,"owner":1994,"repository":1994,"state":2003,"title":2083,"updated_at":2084,"url":2085,"score":2086},"### Environment\r\n\r\n- Operating System: Linux\r\n- Node Version: v16.20.0\r\n- Nuxt Version: 3.6.2\r\n- Nitro Version: 2.5.2\r\n- Package Manager: npm@9.4.2\r\n- Builder: vite\r\n- User Config: app, experimental\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n\r\n### Reproduction\r\n\r\nhttps://github.com/Twitch0125/nuxt-server-components-base-url-reproduction\r\n\r\nI'd add a stackblitz link, but I think stackblitz's github integration might be broken at the time of creating this?\r\n\r\n### Describe the bug\r\n\r\nwhen defining `app.baseURL` in nuxt.config.ts, the server components endpoint looks like its rendering incorrectly.\r\n\r\nI get this error during SSR\r\n```\r\nUnexpected token \u003C in JSON at position 0\r\n\r\nat parseJSONFromBytes (node:internal/deps/undici/undici:6571:19)\r\nat successSteps (node:internal/deps/undici/undici:6545:27)\r\nat node:internal/deps/undici/undici:1211:60\r\nat node:internal/process/task_queues:140:7\r\nat AsyncResource.runInAsyncScope (node:async_hooks:203:9)\r\nat AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)\r\n```\r\n\r\nHowever, it works correctly after hydration. If you set `showComponent` to `false` in `pages/index.vue` in the reproduction\r\nit'll render correctly.\r\n\r\n### Logs\r\n\r\nI also see this warning server-side\r\n```\r\n [Vue warn]: Component NuxtIsland is missing template or render function.\r\n```",[2079,2080,2081],{"name":2012,"color":2013},{"name":1985,"color":1986},{"name":2059,"color":2042},22002,"Server components break during SSR if you set a baseURL","2023-07-18T15:07:37Z","https://github.com/nuxt/nuxt/issues/22002",0.64040315,{"labels":2088,"number":2093,"owner":1994,"repository":1994,"state":2003,"title":2094,"updated_at":2095,"url":2096,"score":2097},[2089,2090,2091,2092],{"name":2012,"color":2013},{"name":1985,"color":1986},{"name":2056,"color":2057},{"name":1991,"color":1992},14847,"RC 10 breaks with vuetify and \"ssr:false\"","2023-01-19T17:41:08Z","https://github.com/nuxt/nuxt/issues/14847",0.6416107,{"labels":2099,"number":2102,"owner":1994,"repository":1994,"state":2003,"title":2103,"updated_at":2104,"url":2105,"score":2106},[2100,2101],{"name":2012,"color":2013},{"name":1985,"color":1986},12663," [SSR] Error transforming ./node_modules/vue/server-renderer/index.js: Error: Missing \"./server-renderer/index.js\" export in \"vue\" package","2023-01-19T16:09:49Z","https://github.com/nuxt/nuxt/issues/12663",0.64323765,["Reactive",2108],{},["Set"],["ShallowReactive",2111],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"XZmP48yU3qOTQC3eHwD4Kwd9PzKo9ehrdiCYUM3Kn_Q":-1},"/nuxt/nuxt/13117"]