import { Module } from "@nestjs/common";
import { SharedModule } from "./share_modules/share.module";
import { UploadModule } from "./modules/upload/upload.module";
import { ConfigModule } from "@nestjs/config";
import configuration from "./share_modules/config/configuration";
import { SendMailModule } from "./modules/send-mail/send-mail.module";
import { MongooseModule } from "@nestjs/mongoose";
import { HealthcheckModule } from "./modules/healthcheck/healthcheck.module";
import { KafkaModule } from "./modules/kafka/kafka.module";
import { TestConsumer } from "./modules/kafka/test.consumer";
import { SendMailService } from "./modules/send-mail/send-mail.service";
import {
Email_teamplate,
EmailTeamplateSchema,
} from "./modules/send-mail/entities/email-teamplate.entity";
import {
ThirdParty,
ThirdPartySchema,
} from "./modules/send-mail/entities/third-party.entity";
import {
History,
HistorySchema,
} from "./modules/history/entity/history.entity";
import { HistoryService } from "./modules/history/history.service";
@Module({
imports: [
ConfigModule.forRoot({
isGlobal: true,
load: [configuration],
envFilePath: [".env"],
validationOptions: {
abortEarly: true,
},
}),
MongooseModule.forRoot(
`mongodb://${process.env.MONGO_USER}:${process.env.MONGO_PASS}@${process.env.MONGO_HOST}:${process.env.MONGO_PORT}/${process.env.MONGO_DB}`,
{
retryDelay: 1000,
}
),
SharedModule,
UploadModule,
SendMailModule,
HealthcheckModule,
KafkaModule,
MongooseModule.forFeature([
{ name: ThirdParty.name, schema: ThirdPartySchema },
{ name: Email_teamplate.name, schema: EmailTeamplateSchema },
{ name: History.name, schema: HistorySchema },
]),
],
providers: [TestConsumer, SendMailService, HistoryService],
})
export class AppModule {}
字符串
这是我的代码,当我使用pm2 monit时,通信日志显示为“communication > src/app.module.ts(26,2):error TS 1238:Unable to resolve signature of class decorator when called as an expression .无法解析作为表达式调用时类装饰器的签名。无法解析communication > The runtime will invoke the decorator with 2 arguments,but the decorator expects 1.“我不知道错误在哪里
解决问题
1条答案
按热度按时间ui7jx7zq1#
看起来我们的一个数据库实体使用了错误数量的参数的装饰器。你能不能也发布你的实体的内容?