Mysterious `The “modules” key in the @Module() decorator is deprecated`


Mysterious `The “modules” key in the @Module() decorator is deprecated`



Running a nestjs application and the console shows:


WARNING!!
The "modules" key in the @Module() decorator is deprecated and will be removed within next major release. Use the "imports" key instead.



My modules are declared like :


@Module({
imports: [UserModule],
providers: [AuthService, JwtStrategy],
controllers: [AuthController]
})
export class AuthModule {}



I also executed "find in path" for the word modules to ensure there is no modules in my code.


modules


modules



Any ideas?




1 Answer
1



I had this issue with older versions of NestJs. Upgrading package.json helped.
Make sure that you use up-to-date versions ^5.0.0 for all @nestjs/* packages.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to input without newline? (Python)

C++ thread error: no type named ‘type’ MINGW

Analog for TagView in flutter