DEV Community

Ahmed Ben Bettaieb
Ahmed Ben Bettaieb

Posted on

TypeError: this.userRepository.signUp is not a function

I'm new on nest js and I encountered this error while developping login service ``import { Injectable } from '@nestjs/common';
import { UserRepository } from './user.repository';
import { InjectRepository } from '@nestjs/typeorm';
import { AuthSignUpDto } from './dto/auth-signup.dto';

@Injectable()
export class AuthService {
constructor(
@InjectRepository(UserRepository)
private userRepository: UserRepository,
) {}
async signUp(authSignUpDto: AuthSignUpDto): Promise {
return this.userRepository.signUp(authSignUpDto)
}
}

Top comments (1)

Collapse
 
micalevisk profile image
Micael Levi L. C.

do some debugging, check out what's the value of this.userRepository and of this.userRepository.signUp