close

[Solved] TypeError: classTransformer.plainToClass is not a function

Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to use nestjs/graphql and that why I am installed class-transformer but I am facing following error TypeError: classTransformer.plainToClass is not a function in NestJs. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How TypeError: classTransformer.plainToClass is not a function Error Occurs ?

I am trying to use nestjs/graphql and that why I am installed class-transformer but I am facing following error.

[Nest] 5872  - 2021. 11. 21. 오후 7:56:09   ERROR [ExceptionsHandler] classTransformer.plainToClass is not a function
TypeError: classTransformer.plainToClass is not a function

How To Solve TypeError: classTransformer.plainToClass is not a function Error ?

  1. How To Solve TypeError: classTransformer.plainToClass is not a function Error ?

    To Solve TypeError: classTransformer.plainToClass is not a function Error You Just need to downgrade to [email protected] cause of [email protected] makes an error when used in validationPipe of nestJS. Just after downgrading [email protected] Your error must be solved.

  2. TypeError: classTransformer.plainToClass is not a function

    To Solve TypeError: classTransformer.plainToClass is not a function Error You Just need to downgrade to [email protected] cause of [email protected] makes an error when used in validationPipe of nestJS. Just after downgrading [email protected] Your error must be solved.

Solution 1: downgrade to [email protected]

You Just need to downgrade to [email protected] cause of [email protected] makes an error when used in validationPipe of nestJS. Just after downgrading [email protected] Your error must be solved.

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read