Skip to content

Update vercel.md#176

Open
mkv27 wants to merge 1 commit intohonojs:mainfrom
mkv27:patch-1
Open

Update vercel.md#176
mkv27 wants to merge 1 commit intohonojs:mainfrom
mkv27:patch-1

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