Vercel server call not Allowed: 405 Method Not Allowed

Hi all, I have created a server action which works fine locally: [1st img] -> Successfully prints On Client: Server However, when deploying to vercel, I get the following: [2nd img] -> Prints On Client: undefined The source code is
const onServer = async () => {
"use server";

return "Server";
};

export default () => {
onServer().then((res) => {
console.log("On Client: ", res);
});

return (
<div>
HELLO
</div>
);
};
const onServer = async () => {
"use server";

return "Server";
};

export default () => {
onServer().then((res) => {
console.log("On Client: ", res);
});

return (
<div>
HELLO
</div>
);
};
What could be wrong? Thanks for the help!
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server