Problem with nuxt3 ssr

I have a nuxt3 site where most pages are prerendered but some need ssr.

locally, when I run npm run build and open the page on localhost:3000 the ssr pages work, but when I run netlify serve the ssr pages don’t work anymore (the page returns 404). I suspect this is because I see

◈ Using simple static server because '[dev.framework]' was set to '#static'
◈ Ignoring 'targetPort' setting since using a simple static server.

in the build output. In my case it seems like I don’t want to use a “simple static server” and the framework shouldn’t be #static?

Same thing happens if I deploy my site to netlify. The prerendered pages works, while the ssr pages return 404.

We used to have npm run generate in our command build config (UI) but I changed this to npm run build as suggested for nuxt3 projects e.g. here but I can’t get my ssr pages to work. Any help appreciated!

You need to either run netlify dev or netlify build && netlify serve. You cannot run npm run build and then netlify serve.