No HTML visible even with SSR true

Hi, I just started a new nuxt project (latest version). In my nuxt.config.ts I have "ssr: true" but when I look at the source code of the page, I only see some CSS (Nuxt UI) and JS but no HTML. Can anyone help me out? I need it to show HTML. All it shows is some CSS (Nuxt UI) and JS. This is my nuxt.config.ts: // nuxt.config.ts export default defineNuxtConfig({ compatibilityDate: '2025-07-15', devtools: { enabled: true }, ssr: true, modules: [ '@nuxt/ui', '@nuxtjs/sitemap', '@nuxtjs/i18n', ], css: ['~/assets/css/main.css'], i18n: { locales: [ { code: 'en', language: 'en-US', name: 'English', file: 'en.json' }, { code: 'nl', language: 'nl-NL', name: 'Nederlands', file: 'nl.json' } ], defaultLocale: 'nl', strategy: 'prefix_except_default', lazy: true, langDir: 'locales', vueI18n: './i18n.config.ts', detectBrowserLanguage: { useCookie: false, redirectOn: 'no prefix', alwaysRedirect: false } } }) Also, what is new to me is that the directory for my pages is /app/pages.
No description
3 Replies
kapa.ai
kapa.ai2w ago
Hi @Ųŋĸńōŵņ. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Your issue is likely related to the new default directory structure in Nuxt 4. In the latest versions, the pages directory should be placed inside the app/ directory (i.e., app/pages/), not at the project root. If your pages directory is not in the correct location, Nuxt will not recognize your page components, and as a result, no HTML will be rendered—even if SSR is enabled. This matches your observation of only seeing CSS and JS in the page source, but no HTML content. What you should do: - Make sure your directory structure looks like this:
app/
pages/
index.vue
...
nuxt.config.ts
...

app/
pages/
index.vue
...
nuxt.config.ts
...

- Place your page components (e.g., index.vue) inside app/pages/. This change is documented as part of the Nuxt 4 upgrade and is now the default behavior. If you use the old structure (top-level pages/), Nuxt may not detect your pages unless you explicitly configure it otherwise. The ~ alias now points to the app/ directory by default, so ~/pages resolves to app/pages/ New Directory Structure. There is also a GitHub issue confirming that in Nuxt 4, your /pages folder should be inside the /app folder. Summary:
Move your pages directory into the app/ directory (app/pages/). This should resolve the issue and your HTML should be rendered as expected with SSR enabled. If you already have your pages in app/pages/ and still see no HTML, double-check that you have at least one valid page component (e.g., app/pages/index.vue) with a single root element, and that it contains some visible HTML content Guide: pages. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2w ago
<@189795783350943745> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Ųŋĸńōŵņ
ŲŋĸńōŵņOP2w ago
My structure is correct, but no HTML is shown when viewing page source.

Did you find this page helpful?