vercel / remix

Build Better Websites. Create modern, resilient user experiences with web fundamentals.
https://remix.run
MIT License
63 stars 20 forks source link

maxDuration does not work for remix + vite #96

Open lifeiscontent opened 6 months ago

lifeiscontent commented 6 months ago

following the docs using the export const config = { ... } as well as the vercel.json fails to deploy for me

https://vercel.com/docs/functions/configuring-functions/duration

lifeiscontent commented 6 months ago

@TooTallNate any ideas here? we're having a ton of traffic on our site today and would really like to increase this 😅

TooTallNate commented 6 months ago

Can you elaborate on "fails to deploy"? What are you seeing? Can you share a reproduction, or a deployment URL?

lifeiscontent commented 6 months ago

@TooTallNate yep, here you go: https://vercel.com/sort-xyz/sorthub/BPFNXzZGm6jrgnnNFLt6FKf2NbUC

TooTallNate commented 6 months ago

Ok, so ya, you don't configure maxDuration for Remix routes using vercel.json. Do it the export const config = { ... } way like described in the Remix on Vercel docs page.

lifeiscontent commented 6 months ago

@TooTallNate I tried that as well, and the build wouldn't even compile, complained about something to do with some files in node modules already existing. let me revert to that commit and send over a URL

lifeiscontent commented 6 months ago

@TooTallNate here you go: https://vercel.com/sort-xyz/sorthub/3r7gRrzaifeqz7SDvJzWUpVhVmVw

TooTallNate commented 6 months ago

This error seems unrelated to the export const config part, but did you see this issue which looks similar? https://github.com/remix-run/remix/issues/8813

lifeiscontent commented 6 months ago

Screenshot 2024-03-21 at 1 50 18 PM this is the entire diff, removing it fixes the build

lifeiscontent commented 6 months ago

@TooTallNate ^

lifeiscontent commented 6 months ago

interestingly enough, adding the config to root.tsx does not break the build

TooTallNate commented 6 months ago

That is strange. I will relay that to the Remix team. If you could give a standalone reproduction that would help as well.

lifeiscontent commented 6 months ago

I'll see what I can do, thanks!

TooTallNate commented 6 months ago

Ya that would be helpful. I wasn't able to reproduce using the vc init remix template, and changing the config of both of those routes in the template to have export const config = { maxDuration: 30 } worked for me.