我正在使用@nestjs/passport。运行后npm run start:dev
出现错误,但编辑器没有显示错误
node_modules/@nestjs/passport/dist/passport/passport.serializer.d.ts:1:27 - error TS2307: Cannot find module 'passport' or its corresponding type declarations.
1 import * as passport from 'passport';
输入代码:
import { PassportModule } from '@nestjs/passport';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Module } from '@nestjs/common';
import { AuthController } from './auth.controller';
import { AuthService } from './auth.service';
import { UserRepository } from './user.repository';
import { JwtModule } from '@nestjs/jwt';
@Module({
imports:[
PassportModule.register({defaultStrategy:'jwt'}),
JwtModule.register({
secret: 'topSecret51',
signOptions:{
expiresIn:3600,
},
}),
TypeOrmModule.forFeature([UserRepository]),
],
controllers: [AuthController],
providers: [AuthService],
})
export class AuthModule {}
知道问题可能是什么吗?