I've created a module A, that has an exported provider AService. Module B imports module A and has an exported BTransformPipe provider, that uses AService. Now, my understanding is, that when I import module B in module C, I should be able to use BTransformPipe in controller declared in module C, without declaring any further dependencies, but NestJS fails to inject AService in BTransformPipe used in module C. Am I missing anything?
Enhancers don't really go in the providers array nor do they get resolved from there. If you use BTransformPipe in CModule, then CModule needs to have access to all of the dependencis of BTransformPipe. To make this easy to keep track of, your BModule can have AModule in the imports and the exports and then you'll just need to have BModule in the imports of the module where you're wanting to use the BTransformPipe.