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

🐛 Bug Report: Next 15 fails to build with Novu serve() #6881

Closed
2 tasks done
jklinehamer opened this issue Nov 7, 2024 · 3 comments · Fixed by #6963
Closed
2 tasks done

🐛 Bug Report: Next 15 fails to build with Novu serve() #6881

jklinehamer opened this issue Nov 7, 2024 · 3 comments · Fixed by #6963
Labels

Comments

@jklinehamer
Copy link

📜 Description

Trying to build for production

👟 Reproduction steps

  1. Install Novu with a Next 15 app as described in the Novu setup guide
  2. Create the route handler using Novu's serve() function as explained in the docs
  3. Try building your app

👍 Expected behavior

Build successfully

👎 Actual Behavior with Screenshots

Fails to compile
CleanShot 2024-11-07 at 03 20 22

Novu version

Novu SaaS

npm version

No response

node version

No response

📃 Provide any additional context for the Bug.

After NextJS 15 the typing changed for Route Handlers. The second argument is now of type "RouteContext", which causes this error.

Inngest, another open source project with very similar structure to Novu, has resolved the issue for their product. The relevant source code from Inngest (and how they fixed the issue) can be found here: https://github.com/inngest/inngest-js/blob/main/packages/inngest/src/next.ts

Using their source I was able to create a custom Novu serve() function and get this working, but it would be nice to have this out-of-the-box with Novu.

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

Copy link

linear bot commented Nov 7, 2024

@github-actions github-actions bot added the triage label Nov 7, 2024
@rifont
Copy link
Collaborator

rifont commented Nov 11, 2024

Thanks for reporting. We will be releasing a fix for this today.

@rifont
Copy link
Collaborator

rifont commented Nov 12, 2024

Support for Next.js 15 + Turbopack dev (next dev --turbo) is now available with @novu/framework@2.4.0 🎉

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