title: NestJS Dependency Injection Error: provider/module is not part of currently processed module
body: <p>I've just started with NestJS and I'm wondering what the best way to solve this error is</p>
  <p><code>Nest cannot export a provider/module that is not a part of the currently processed module (UsersModule). Please verify whether the exported UsersService is available in this particular context.</code></p>
  <p>I am following along with the documentation <a href="https://docs.nestjs.com/security/authentication" rel="nofollow noreferrer">here</a> and I seem to have hit a brick wall. My app won't compile so I can't test any further. I'll add some of the files as examples.</p>
  <p><code>auth.module.ts</code></p>
  <pre><code>import { Module } from '@nestjs/common';
  import { UsersModule } from 'src/users/users.module';
  import { AuthController } from './controllers/auth/auth.controller';
  import { AuthService } from './services/auth/auth.service';
  
  @Module({
    imports: [UsersModule],
    controllers: [AuthController],
    providers: [AuthService],
    exports: [AuthService],
  })
  export class AuthModule {}
  </code></pre>
  <p><code>users.module.ts</code></p>
  <pre><code>import { Module } from '@nestjs/common';
  import { MongooseModule } from '@nestjs/mongoose';
  import { UsersController } from './controllers/users/users.controller';
  import { User, UserSchema } from './schemas/user.schema';
  import { UsersService } from './services/users/users.service';
  
  @Module({
    imports: [
      MongooseModule.forFeature([{ name: User.name, schema: UserSchema }]),
    ],
    controllers: [UsersController],
    providers: [
      {
        provide: 'USERS_SERVICE',
        useClass: UsersService,
      },
    ],
    exports: [UsersService],
  })
  export class UsersModule {}
  </code></pre>
  <p><code>users.service.ts</code></p>
  <pre><code>import { Injectable } from '@nestjs/common';
  import { InjectModel } from '@nestjs/mongoose';
  import { Model } from 'mongoose';
  import { CreateUserDto } from 'src/users/dto/user.dto';
  import { User, UserDocument } from 'src/users/schemas/user.schema';
  import { IUserService } from './user';
  
  @Injectable()
  export class UsersService implements IUserService {
    constructor(@InjectModel(User.name) private userModel: Model&lt;UserDocument&gt;) {}
  
    // async code for database modification
  
    }
  }
  </code></pre>
  <p>Any help would be greatly appreciated! Many thanks!</p>