nestjs / bull

Bull module for Nest framework (node.js) :cow:
https://nestjs.com
MIT License
609 stars 102 forks source link

Error Nest cant resolve dependencies of the BullExplorer #954

Closed cloudcompute closed 3 years ago

cloudcompute commented 3 years ago

Did you read the migration guide?

Is there an existing issue that is already proposing this?

Potential Commit/PR that introduced the regression

No response

Versions

No response

Describe the regression

When I run the Nestjs server, I get the following error. I am using the NestJS BullModule.

Error: Nest can't resolve dependencies of the BullExplorer (?, DiscoveryService, BullMetadataAccessor, MetadataScanner) Please make sure that the argument ModuleRef at index [0] is available in the BullModule context.

Potential solutions:

If ModuleRef is a provider, is it part of the current BullModule? If ModuleRef is exported from a separate @Module, is that module imported within BullModule? @Module({ imports: [ / the Module containing ModuleRef / ] })

Minimum reproduction code

Expected behavior

The Nest Server should not stop and display this error. Instead, it starts listening to the incoming requests.

Other

Main nestjs/ packages I am using are: "@nestjs/bull": "^0.4.1", "@nestjs/common": "8.0.11", "@nestjs/config": "1.0.2", "@nestjs/core": "8.0.11", "@nestjs/graphql": "9.0.5", –

cloudcompute commented 3 years ago

If anyone can give a hint, what could be the source of problem, it'd help me. Does it have anything to do with the NestJs version 8, or a bug in Bull module, or something wrong at me end.

Thanks.

micalevisk commented 3 years ago

@ramandhingra if you provide a minimum repository that reproduces this, it'd help us to help you ^^

cloudcompute commented 3 years ago

Thanks @micalevisk

Here is the link to the repository: https://github.com/fivethree-team/nestjs-prisma-starter

Kindly upgrade all the modules listed in package.json to the latest versions. Also add the nestjs/bull module.

micalevisk commented 3 years ago

I've downloaded the main branch of that repo, and set up the bare minimum @nestjs/bull. Everything went fine.

screenshots ![image](https://user-images.githubusercontent.com/13461315/136662946-3231e36a-09c1-4196-bfa3-2ec286aab95d.png) ![image](https://user-images.githubusercontent.com/13461315/136662920-304bc941-246d-4201-af30-a192e4682980.png) ![image](https://user-images.githubusercontent.com/13461315/136662931-d384f863-d1ed-4914-b28e-38af67f0405a.png)
cloudcompute commented 3 years ago

Pl. upgrade the entire repo. to their latest versions. Mine are : "@nestjs/bull": "^0.4.1", "@nestjs/common": "8.0.11", "@nestjs/config": "1.0.2", "@nestjs/core": "8.0.11", "@nestjs/graphql": "9.0.5",

My @nestjs/coreis: 8.0.11 while your is: 8.0.6

micalevisk commented 3 years ago

My @nestjs/core is: 8.0.11 while your is: 8.0.6

actually, mine is 8.0.11 as well

image


looks like this is not a bug. Please use discord for this or provide a repo that reproduces your issue.

cloudcompute commented 3 years ago

Thanks for the help @micalevisk

Yesterday I had written this issue on discord as well.

When you said "looks like this is not a bug", do you mean that there is no bug in Nest JS and Bull module code?

micalevisk commented 3 years ago

I had written this issue on discord as well.

I didn't find it there. Can you leave the link for your message here?

do you mean that there is no bug in Nest JS and Bull module code?

no. I meant this seems to be some misconfiguration on your side. Maybe this is not even related to @nestjs/bull but I can't tell much since I didn't manage to reproduce this.

cloudcompute commented 3 years ago

Here is the link

https://discord.com/channels/520622812742811698/655535843582410762

kamilmysliwiec commented 3 years ago

This seems to be a configuration issue on your side. I couldn't reproduce it either.