website
website copied to clipboard
Update vercel.md
Isn't this mandatory to avoid this issue when using with NextJS?
Hi @mkv27
Isn't this mandatory to avoid this issue when using with NextJS?
No. To avoid the issue, you have to add NODEJS_HELPERS=0
to your project.
Hello! But what if you need those helpers in other parts of your project?
Maybe we have only this way: https://vercel.com/docs/functions/serverless-functions/runtimes/node-js#disabling-helpers-for-node.js
I just noted there is a similar issue with two different sources, I mean the issue is the same "500 error when the method is not GET or HEAD".
- When you have a node project with the api folder and would like to deploy it in Vercel you'll need the
NODEJS_HELPERS=0
- When you have a NextJS project and would like to deploy it in Vercel you just need:
export const config = {
api: {
bodyParser: false,
},
}