N
Novu5mo ago
KaisSalha

Issue with importing serve function

I'm trying to follow this guide: https://docs.novu.co/echo/concepts/endpoint and this is broken: import { EchoRequestHandler, ServeHandlerOptions } from '@novu/echo'; Those aren't exported from the package
4 Replies
Ask Inkeep
Ask Inkeep5mo ago
Hi @KaisSalha, I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question. ----------------------------- While I generate an answer, here are some sources that might be helpful: * Integrate Novu with Nuxt * Integrate Novu with Next.js * Introduction * Quick Start -----------------------------
Ask Inkeep
Ask Inkeep5mo ago
Answer It appears that the imports EchoRequestHandler and ServeHandlerOptions you are trying to use are not directly mentioned in the provided documentation extracts. However, the correct import for the serve function from the @novu/echo package should look like this:
import { serve } from "@novu/echo/nuxt"; // For Nuxt.js integration
// or
import { serve } from "@novu/echo/next"; // For Next.js integration
import { serve } from "@novu/echo/nuxt"; // For Nuxt.js integration
// or
import { serve } from "@novu/echo/next"; // For Next.js integration
(1) , (2) These snippets show how to properly use the serve function within Nuxt.js and Next.js frameworks respectively. If EchoRequestHandler and ServeHandlerOptions are not being found, it's possible they might not be exported or could be part of a different version or package. Please ensure you are using the correct version of the package that supports these exports, or check the latest documentation or the repository for any recent changes that might have deprecated or moved these exports.
KaisSalha
KaisSalha5mo ago
I'm intergrating it with Fastify so I'll have to go the manual route. I'm on the latest available version: "@novu/echo": "0.24.3-alpha.0",
Pawan Jain
Pawan Jain5mo ago
@KaisSalha Thanks for sharing. We are working on fix
Want results from more Discord servers?
Add your server