fastify-kafka icon indicating copy to clipboard operation
fastify-kafka copied to clipboard

Property 'kafka' does not exist on type 'FastifyInstance<Server, IncomingMessage,>

Open aniyazngn opened this issue 1 year ago • 1 comments

Prerequisites

  • [X] I have written a descriptive issue title
  • [X] I have searched existing issues to ensure the issue has not already been raised

Issue

server.post('/data', (req, reply) => {
  server.kafka.push({
    topic: 'test',
    payload: req.body,
    key: 'dataKey',
  })
})

it throws the following erorr
 "

Property 'kafka' does not exist on type 'FastifyInstance<Server, IncomingMessage, ServerResponse, Logger<{ level: string; }>, FastifyTypeProviderDefault> & PromiseLike<...>'.ts(2339)

" Anyone else facing similar problem?

aniyazngn avatar Mar 28 '24 08:03 aniyazngn

Hi @aniyazngn, is this still an issue? This is a dated issue, and Fastify v5 has released since this was first created.

Fdawgs avatar Jan 12 '25 10:01 Fdawgs