NestJS 中注入服务未定义的方法
Method undefined from injected service in NestJS
NestJS:函数 create123 显示但通过错误
类型错误:无法读取未定义的属性(读取 'create123')
这里是构造函数
\`export class AuthenticationService {
constructor(
private readonly usersService: UsersService,
private readonly jwtService:JwtService,
private readonly configService:ConfigService
) {} \`
\` try {
const createdUser = await this.usersService.create123(data)
console.log('inside',createdUser)
createdUser.password = '';
return createdUser;
}`
我尝试在身份验证模块中提供用户服务。但是没有用。
期待:调用注册方法&工作
这可能是由于循环依赖而发生的。 (A 需要 B AND B 需要 A)。
请阅读this
NestJS:函数 create123 显示但通过错误 类型错误:无法读取未定义的属性(读取 'create123')
这里是构造函数
\`export class AuthenticationService {
constructor(
private readonly usersService: UsersService,
private readonly jwtService:JwtService,
private readonly configService:ConfigService
) {} \`
\` try {
const createdUser = await this.usersService.create123(data)
console.log('inside',createdUser)
createdUser.password = '';
return createdUser;
}`
我尝试在身份验证模块中提供用户服务。但是没有用。
期待:调用注册方法&工作
这可能是由于循环依赖而发生的。 (A 需要 B AND B 需要 A)。
请阅读this