-
Notifications
You must be signed in to change notification settings - Fork 980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug?]: Deploy to Vercel breaks all server functions (500 errors with cryptic messages) #10926
Comments
Hi does anyone else have any issues with Vercel deployed Redwood? I've deleted my project off Vercel. Given my experience I wouldn't recommend Vercel as a deploy target for RedwoodJS. |
Hi @DrakenKor and @RinKimLaw I was working with Vercel to improve the deployment and have them fix the build issue where functions didn't get configured for memory or duration and I think their cli update vercel/vercel#11776 got released before we could let you and other Vercel users know. I have a draft for the docs change: #10891 We intended to have fixes for #10022 and #1664 with vercel/vercel#11776. Documents support for Vercel API endpoint (ie, functions) configuration via export const config syntax. I'll try a few builds and deploys as well but, could you try:
Thanks and appreciate patience as we wanted to make the RW + Vercel experience better. |
@DrakenKor Could you give me some more information on:
I used your https://github.com/DrakenKor/vercel-redwood-tester to reproduce and shared with Vercel to try it out. If you could update that repo with how you have setup and edge function, I can try that and then get in touch with Vercel to see what might be happening. I'll try with an example like: export const config = {
runtime: 'edge',
}
export default function handler(_req: Request) {
return new Response('Hello World')
} |
@DrakenKor and @RinKimLaw I'm trying to reproduce and also wanted to make sure your Vercel cli is the latest:
If not, please I did deploy that tester app and can call the function and get a response: As @DrakenKor does, after adding a hello edge function, I see the middleware: I tried to call a hello function in edge as they documented but I probably didn't get the response correct: export const config = {
runtime: 'edge',
}
export default function handler(_req: Request) {
return new Response('Hello World')
} I'll see what the edge function should be instead. |
Great to hear!
Can you share more details about this? Am a bit confused if you have edge functions or not. Actually, maybe we should pair on it to resolve faster -- then I can also communicate back to Vercel any issues more clearly. Could you find some time next week perhaps here: https://savvycal.com/dt/redwoodjs Thanks! |
To summarise: I know that NextJS has a middleware edge function deployed by default, and I think Vercel's default deploy for RedwoodJS introduced that middleware similar to NextJS. I think when they changed the config method for RedwoodJS, they broke the default deployment config. |
@dthyresson I've booked a time for you on (I assume) your Monday evening (My Tuesday morning) |
What's not working?
Hi,
My RedwoodJS project, which was running fine previously, now breaks on deployment in the live environment.
All backend functions are throwing 500 errors, with cryptic messages. Everything is working same as before locally (100% fine). These functions are event/timer driven as well as user triggered, all are broken.
My intuition says that the way Vercel is building Redwoodjs is changed, and this change is breaking the site
Not sure if it's related to Vercel changing the deployment for RedwoodJS:
#10022
Currently my project, which serves a client, is down and I've tried the following fixes on my end (No resolution):
Upgrade Redwood from ~7.6 to latest 7.7.2
Add a vercel.json with some basic configuration:
Errors:
Complete error from backend function:
How do we reproduce the bug?
Deploy redwood 7.7.2 to Vercel, with atleast 1 backend function apart from graphql.
What's your environment? (If it applies)
Update
I just noticed that Vercel now have a 'comments middleware' that applies to all routes, and it's an edge function. This could be the culprit:
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: