wondering if anyone else has been having this issue? Restarting the TS server and running the app works but this is causing build errors and sometimes prevents server from running.
The inferred type of 'canActivate' cannot be named without a reference to '.pnpm/[email protected]/node_modules/rxjs'. This is likely not portable. A type annotation is necessary.
import {
ExecutionContext,
Injectable,
InternalServerErrorException,
Logger,
UnauthorizedException,
} from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { Reflector } from '@nestjs/core';
import { AuthGuard } from '@nestjs/passport';
import { UserRole } from '@prisma/client';
import { verify } from 'jsonwebtoken';
@Injectable()
export class AtGuard extends AuthGuard('jwt') {
constructor(
private readonly reflector: Reflector,
private readonly logger: Logger,
private readonly config: ConfigService
) {
super();
}
canActivate(context: ExecutionContext) {} // TS error occurs on this line