felixmosh / bull-board

🎯 Queue background jobs inspector
MIT License
2.14k stars 343 forks source link

`createBullBoard`'s `serverAdapter` and `ExpressAdapter` types don't match #779

Closed s-lukashenka-micoworks closed 4 days ago

s-lukashenka-micoworks commented 1 week ago

Current behavior:

@bull-board/api version: 5.20.4

I am seeing the following type error with serverAdapter when using the expressjs way:

Screenshot 2024-06-25 at 11 18 28

Desired behavior

No type mismatch error observed.

felixmosh commented 1 week ago

Hi, can you share you code snippet?

felixmosh commented 1 week ago

This example.ts file is the entry point of the dev env. It is working as expected, Typescript wise.

Can you check if your code is different?

Dremora commented 1 week ago

This error started occurring for me after upgrading to the latest TypeScript v5.5.2.

felixmosh commented 1 week ago

Let me check this....

felixmosh commented 1 week ago

I've updated to Typescript 5.5.2, it shows some errors on UI, but not inside the adapter... as yours Can you prepare a small repo that reproduces this?

image

Compiled successfully with TS 5.5.2

felixmosh commented 1 week ago

Pay attention, you have 2 versions of the lib.... image Try to clean install it.

Dremora commented 1 week ago

Indeed, for some reason there were two (identical) versions present for me as well. This is likely due to a bug in pnpm. Upgrading pnpm from v7 to v9 fixed this for me. Weirdly enough, two copies were not an issue before TypeScript upgrade.

felixmosh commented 1 week ago

@Dremora, Is this solved for now?

Dremora commented 4 days ago

@felixmosh it got resolved for me by upgrading pnpm to the latest version. I'd suggest @s-lukashenka-micoworks trying the same.