Skip to content
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

Update vercel.md #176

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update vercel.md #176

wants to merge 1 commit into from

Conversation

mkv27
Copy link

@mkv27 mkv27 commented Dec 13, 2023

Isn't this mandatory to avoid this issue when using with NextJS?

@yusukebe
Copy link
Member

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.

@mkv27
Copy link
Author

mkv27 commented Dec 13, 2023

Hello! But what if you need those helpers in other parts of your project?

@yusukebe
Copy link
Member

@mkv27
Copy link
Author

mkv27 commented Dec 13, 2023

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,
	},
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants