title: Nest can't resolve dependencies of AuthService
body: <p>I am following the documentation present here</p>
  <p><a href="https://docs.nestjs.com/techniques/authentication#jwt-functionality" rel="noreferrer">https://docs.nestjs.com/techniques/authentication#jwt-functionality</a></p>
  <p>To have faster support I have created a git repository with the problem</p>
  <p><a href="https://github.com/Sano123456/nestjs-jwt" rel="noreferrer">https://github.com/Sano123456/nestjs-jwt</a></p>
  <pre><code>node -v -&gt; v10.15.2
  npm -v -&gt; 6.14.6
  nest -v -&gt; 7.4.1
  </code></pre>
  <p><strong>First Problem:</strong>
  in AuthModule if I do as described in documentation and just import UserModule, it return me error of circular dependency between UserModule and AuthModule</p>
  <pre><code>@Module({
    imports:[
      UsersModule,
      PassportModule
    ],
    providers: [AuthService],
    controllers: [AuthController],
    exports:[AuthService, LocalStrategy]
  })
  export class AuthModule {}
  </code></pre>
  <p>error:</p>
  <pre><code>[ExceptionHandler] Nest cannot create the AuthModule instance.
  The module at index [0] of the AuthModule &quot;imports&quot; array is undefined.
  
  Potential causes:
  - A circular dependency between modules. Use forwardRef() to avoid it. Read more: https://docs.nestjs.com/fundamentals/circular-dependency
  - The module at index [0] is of type &quot;undefined&quot;. Check your import statements and the type of the module.
  
  Scope [AppModule -&gt; UsersModule] +6ms
  </code></pre>
  <p><strong>Possibile solution</strong> in imports array of AuthModule instead of UserModule put forwardRef(() =&gt; UsersModule),
  this actually remove the error but not sure if this is the right way</p>
  <p><strong>Second problem:</strong>
  it says that can't find LocalStrategy class even if it's present and declared in AuthModule</p>
  <pre><code>[ExceptionHandler] Nest cannot export a provider/module that is not a part of the currently processed module (AuthModule). Please verify whether the exported LocalStrategy is available in this particular context.Is LocalStrategy part of the relevant providers/imports within AuthModule?
  </code></pre>
  <p><strong>Possibile solution</strong> right now I don't have any solution, I just remove it to understand what is the problem</p>
  <p><strong>Third problem</strong> :
  after removing LocalStrategy,</p>
  <pre><code>[ExceptionHandler] Nest can't resolve dependencies of the AuthService (?). Please make sure that the argument dependency at index [0] is available in the AuthModule context.
  
  Potential solutions:
  - If dependency is a provider, is it part of the current AuthModule?
  - If dependency is exported from a separate @Module, is that module imported within AuthModule?
    @Module({
      imports: [ /* the Module containing dependency */ ]
    })
   +1ms
  Error: Nest can't resolve dependencies of the AuthService (?). Please make sure that the argument dependency at index [0] is available in the AuthModule context.
  </code></pre>
  <p>anyone solved this issues?</p>