title: The jwt service this.jwtService.sign is not a function
body: <p>With this code in AuthService:</p>
  <pre class="lang-typescript prettyprint-override"><code>@Injectable()
  AuthService {
  
    constructor(
      @InjectRepository(UserRepository)
      private jwtService: JwtService
      private userRepository: UserRepository
      ) {
    }
  
    async login(loginCredentialsDto: LoginCredentialsDto): Promise&lt;{ accessToken: string }&gt; {
      const email = await this.userRepository.validatePassword(loginCredentialsDto);
      const payload: JwtPayLoad = {email};
      return {
          accessToken: this.jwtService.sign(payload),
      };
    }
  }
  </code></pre>
  <p>Once it is compiled during runtime I get the following error:</p>
  <blockquote>
  <p>[Nest] 12998   - 07/03/2020, 9:22:20 PM   [ExceptionsHandler] this.jwtService.sign is not a function +213303ms</p>
  </blockquote>
  <p>Following is the AuthModule:</p>
  <pre class="lang-typescript prettyprint-override"><code>@Module({
      imports: [
          PassportModule.register({ defaultStrategy: 'jwt' }),
          JwtModule.register({
              secret: 'topSecret51',
              signOptions: {
                  expiresIn: 3600,
              }
          }),
          TypeOrmModule.forFeature([UserRepository])],
      controllers: [AuthController],
      providers: [AuthService, JwtStrategy],
      exports: [
          JwtStrategy,
          PassportModule,
      ], }) 
  export class AuthModule { }
  </code></pre>
  <p>Any ideas how this can be resolved?</p>
  <p>I have re-installed npm, removed node modules and tried to modify code. But it still does not work.</p>