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

Probot 12 app not working on NextJS and vercel #1587

Closed
maximousblk opened this issue Aug 31, 2021 · 4 comments · Fixed by #1588
Closed

Probot 12 app not working on NextJS and vercel #1587

maximousblk opened this issue Aug 31, 2021 · 4 comments · Fixed by #1588
Labels

Comments

@maximousblk
Copy link
Contributor

Bug Report

Current Behavior

I had a probot 11 app that uses NextJS and typescript and is deployed on vercel. When I upgrade to probot 12, it fails because createProbot() no longer accepts webhookPath property. And if I remove it, I get the following error:

image

You can find the repo for minimal reproduction at https://github.com/maximousblk/probot-nextjs-starter

Expected behavior/code

Should handle the webhook properly

Environment

  • Probot version(s): 12.1.0
  • Node/npm version: v16.6.1 (local) and v14.17.5 (Vercel)
  • OS: Ubuntu 20.04.3 LTS (local) and Amazon Linux 2 (Vercel)

Possible Solution

Additional context/Screenshots

@welcome
Copy link

welcome bot commented Aug 31, 2021

Thanks for opening this issue. A contributor should be by to give feedback soon. In the meantime, please check out the contributing guidelines and explore other ways you can get involved.

@gr2m
Copy link
Contributor

gr2m commented Aug 31, 2021

Try this

export default createNodeMiddleware(app, {
  probot,
  webhooksPath: "api/webhooks"
});

We missed to document that option, sorry. If it works for you, could you send a pull request to update the docs at https://github.com/probot/probot/blob/master/docs/development.md#use-createnodemiddleware?

GitHub
🤖 A framework for building GitHub Apps to automate and improve your workflow - probot/development.md at master · probot/probot

@maximousblk
Copy link
Contributor Author

Thanks, that worked!

opened the pr: #1588

@maximousblk maximousblk reopened this Aug 31, 2021
AaronDewes added a commit to AaronDewes/example-vercel that referenced this issue Aug 31, 2021
gr2m pushed a commit to probot/example-vercel that referenced this issue Aug 31, 2021
@github-actions
Copy link

github-actions bot commented Sep 1, 2021

🎉 This issue has been resolved in version 12.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

2 participants