Next.js Discord

Discord Forum

Server actions 🚨 BROKEN IN PRODUCTION 🚨 as of today Next@14.2.2

Answered
Asiatic Lion posted this in #help-forum
Open in Discord
Asiatic LionOP
Anyone else having this issue? My production app had downtime caused by server actions completely dying in whatever new code was shipped on the Vercel platform today. Any new deployments result in a "405 Method Not Allowed" Anyone else?
Answered by Siamese Crocodile
Support got back to me, looks like its a vercel cli issue. In the interim, you can force the old version of the CLI by setting the following as an environment variable and redeploying:

VERCEL_CLI_VERSION=vercel@33.7.1
View full answer

24 Replies

have you tried on new projects?
Siamese Crocodile
Yes, getting this error too
I used instant rollback to a version that I no to be working, so that's kept my production deployment up
However, I've then redeployed that working version on a test-branch and on vercel it doesn't work, so there is some build / runtime change that has broken server actions
Is there somewhere to report other than here? I can't even post in #discussions for some reason
https://www.vercel-status.com/ doesn't show any investigations yet
for Vercel specific issues it's better to post on their Discussions page: https://github.com/vercel/vercel/discussions
Siamese Crocodile
Thanks, is that definitely the right forum? Labelled as "Vercel CLI discussions"
Siamese Crocodile
Yacare Caiman
also ran into this, it seems specific to edge runtime specifically for me, might be a cloudflare issue?
Siamese Crocodile
Should flag, I'm using edge too
Siamese Crocodile
Confirmed its edge specific for me as well
Siamese Crocodile
Support got back to me, looks like its a vercel cli issue. In the interim, you can force the old version of the CLI by setting the following as an environment variable and redeploying:

VERCEL_CLI_VERSION=vercel@33.7.1
Answer
Cane di Oropa
happened to me a few days ago, the issue was node version in vercel project settings. v20 doesn't work, v18 works fine!
Sloth bear
Thank you! Was my problem too, but with 404 insted of 405 😄
Cane di Oropa
i've got another issue with server actions, that didn't happen before, only noticed today... and it happens only on vercel, not locally. I use react query to prefetch data, passing server action as queryFn. For some reason, the dynamic param that I pass, an id, gets modified. It adds a ".action" at the end. Attached a supabase log. I'm definitely not adding that, I'm grabbing the param from page props. Anybody have any ideas on this ?
@Siamese Crocodile Support got back to me, looks like its a vercel cli issue. In the interim, you can force the old version of the CLI by setting the following as an environment variable and redeploying: VERCEL_CLI_VERSION=vercel@33.7.1
Chinese Alligator
It worked for me too, thank youuu ! but this really made me think if I want to stay with Vercel as this is my first day and bugs started happening.
Red wasp
Hi, I have the same issue, but I'm deploying on my own VPS with Docker...
I have a route.ts file in /src/app/api/import-batch/[id]/route.ts

It contains two methods : GET and PUT, both works in local, but PUT does not work in production.
I tried to move the PUT handler in another file. The same issue happens. I also tried to swap the PUT for a POST, same error.

Do you guys have any idea on how to solve it?

More details here : https://stackoverflow.com/questions/79619124/get-and-put-produces-405-method-not-allowed-on-nextjs-15