nestjs-cls icon indicating copy to clipboard operation
nestjs-cls copied to clipboard

Docker Error

Open shauntrennery opened this issue 2 years ago • 4 comments

Any idea why I'm getting this error within a Docker image?

Nest can't resolve dependencies of the PrismaService (?). Please make sure that the argument ClsService at index [0] is available in the PrismaModule context.

Working perfectly when running locally or once deployed.

shauntrennery avatar Apr 09 '24 08:04 shauntrennery

Might be because of duplicated node_modules inside and outside the image, assuming if you're mounting a volume.

But unless you can show me some more context and/or a minimal reproducible example, it's impossible to tell.

Papooch avatar Apr 09 '24 13:04 Papooch

Hey @shauntrennery, were you able to move past this, or are you still stuck?

Papooch avatar Apr 15 '24 07:04 Papooch

@Papooch I really appreciate the check-in. Unfortunately I've not been able to solve the issue, even after following your recommendations and double checking the logic. I've parked the issue for the moment and will revisit when I get a gap.

shauntrennery avatar Apr 15 '24 10:04 shauntrennery

Okay, I'll leave the issue open for now. When you revisit it, be sure to get back with more details and ideally some reproduction, so I can help you investigate.

Papooch avatar Apr 15 '24 10:04 Papooch

Closing for lack of activity. For anyone stumbling upon this in the future, the issue is most definitely caused by misconfigured docker volumes. Please open a new issue if you need further assistance.

This might also be related: https://github.com/Papooch/nestjs-cls/issues/163.

Papooch avatar Sep 27 '24 10:09 Papooch