Open LegendTomaszKwiatkowski opened 1 year ago
please provide a ready-made reproduction. If every maintainer has to recreate every reproduction just from description that doesn't scale and costs a lot of time.
please provide a ready-made reproduction. If every maintainer has to recreate every reproduction just from description that doesn't scale and costs a lot of time.
added reproduction link
https://stackblitz.com/edit/sveltejs-kit-template-default-af8uvi?file=src%2Froutes%2Fforum%2F%5B...slug%5D%2F%2Bserver.js
just run npm run build
It seems it happens when there's both a +page(.server).ts
and +server.ts
present that somehow prerendering fails then when starting from a non-prerenderable entry point.
do you think there is something I could do ? or it's a adapter-node
bug ? for now I can remove entries when building for dev, but it does not seem right. Also I've marked all the files as prerender = false
but that somehow is ignored ?
Hi, having similar issue while pre-rendering. Got "Error: /api/+server.ts is not prerenderable" during the build (with adapter-vercel
) although i have set prerender = false
to that specific +server.ts file. Therefore i am curios to know if there is any update? Thank you.
@korcekj can you provide a repository reproduction?
@s3812497 I don't think it will be necessary because I found the root cause. The route i was trying to pre-render leads to an API route which is marked as not pre-renderable. In this case i have to either change it to pre-renderable or host the API separately. No need to investigate further, thank you.
Describe the bug
In my app, I build 2 apps, one is for development with all prerender false but with entries specified. That worked fine so far. And other app have some routes set to prerender and that also worked fine. I've added new server side more comples route like
forum/[...slug=noAssets]
Inside which I have+server.ts, +page.server.ts, +page.svelte, +page.ts
Which in each of this files I've specifically saidexport const prerender = false
at all times. I still havekit.prerender.entries = ['/forum']
, which to my understanding shouldn't matter, and it never did until now. But I get error when building node app, it tries to prerender/forum
How can I debug what triggers it to be marked for prerender ?
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-af8uvi?file=src%2Froutes%2Fforum%2F%5B...slug%5D%2F%2Bserver.js run
npm run build
Logs
No response
System Info
Severity
serious, but I can work around it
Additional Information
No response