Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

TypeError with Nestjs + Fastify #896

Open
Mnigos opened this issue Feb 10, 2025 · 4 comments
Open

TypeError with Nestjs + Fastify #896

Mnigos opened this issue Feb 10, 2025 · 4 comments

Comments

@Mnigos
Copy link

Mnigos commented Feb 10, 2025

Type 'typeof FastifyAdapter' is not assignable to type 'new () => BullBoardServerAdapter'.
  Type 'FastifyAdapter' is not assignable to type 'BullBoardServerAdapter'.
    Type 'FastifyAdapter' is not assignable to type 'IServerAdapter'.
      Types of property 'setQueues' are incompatible.
        Type '(bullBoardQueues: BullBoardQueues) => FastifyAdapter' is not assignable to type '(bullBoardQueues: BullBoardQueues) => IServerAdapter'.
          Types of parameters 'bullBoardQueues' and 'bullBoardQueues' are incompatible.
            Type 'import("/Users/igormakowski/Documents/repositories/rigtch/rigtch-fm/node_modules/.pnpm/@bull-board+api@6.5.4_@bull-board+ui@6.5.4/node_modules/@bull-board/api/dist/typings/app").BullBoardQueues' is not assignable to type 'import("/Users/igormakowski/Documents/repositories/rigtch/rigtch-fm/node_modules/.pnpm/@bull-board+api@6.7.7_@bull-board+ui@6.7.7/node_modules/@bull-board/api/dist/typings/app").BullBoardQueues'.
              Property 'delimiter' is missing in type 'import("/Users/igormakowski/Documents/repositories/rigtch/rigtch-fm/node_modules/.pnpm/@bull-board+api@6.5.4_@bull-board+ui@6.5.4/node_modules/@bull-board/api/dist/src/queueAdapters/base").BaseAdapter' but required in type 'import("/Users/igormakowski/Documents/repositories/rigtch/rigtch-fm/node_modules/.pnpm/@bull-board+api@6.7.7_@bull-board+ui@6.7.7/node_modules/@bull-board/api/dist/src/queueAdapters/base").BaseAdapter'.

queues.module.ts

import { FastifyAdapter } from '@bull-board/fastify'
import { BullBoardModule } from '@bull-board/nestjs'
import { BullModule } from '@nestjs/bull'
import { Module } from '@nestjs/common'
import { ConfigService, ConfigModule } from '@nestjs/config'

@Module({
  imports: [
    BullModule.forRootAsync({
      useFactory: (configService: ConfigService) => ({
        redis: configService.get('redis'),
      }),
      imports: [ConfigModule],
      inject: [ConfigService],
    }),
    BullBoardModule.forRoot({
      route: '/queues',
      adapter: FastifyAdapter,
    }),
  ],
})
export class QueuesModule {}

The board itself works as expected.

@felixmosh
Copy link
Owner

Hi, thank you foe reporting this issue.
Can u update all @bull/x packages to latest?
It looks like you have different versions.

@Mnigos
Copy link
Author

Mnigos commented Feb 13, 2025

All the versions are the same and up to date.

    "@bull-board/api": "^6.7.7",
    "@bull-board/fastify": "^6.7.7",
    "@bull-board/nestjs": "^6.7.7",

@felixmosh
Copy link
Owner

Ok, thanx,
Can you make a small repo that reproduces this issue?

@Mnigos
Copy link
Author

Mnigos commented Feb 18, 2025

Hi sorry, for delay, I got a lot on my head lately. I will try to create some reproduction, but I'm pretty sure, that provided code should be enough to reproduce this issue.

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

No branches or pull requests

2 participants