ever-co/ever-traduora

Problem with startup

tasselchof opened this issue · 3 comments

Describe the bug
I am trying to start an app and failing to register

To Reproduce
App 1242274 output: [Nest] 1242274 - 02/18/2021, 8:38:19 PM [NestFactory] Starting Nest application...
App 1242274 output: No email transport configured. Please check the documentation on how to configure the mail service at: https://docs.traduora.com/docs/configuration
App 1242274 output: [Nest] 1242274 - 02/18/2021, 8:38:19 PM [InstanceLoader] PassportModule dependencies initialized +123ms
App 1242274 output: [Nest] 1242274 - 02/18/2021, 8:38:19 PM [InstanceLoader] TypeOrmModule dependencies initialized +1ms
App 1242274 output: [Nest] 1242274 - 02/18/2021, 8:38:19 PM [InstanceLoader] JwtModule dependencies initialized +1ms
App 1242274 output: [Nest] 1242274 - 02/18/2021, 8:38:19 PM [InstanceLoader] HttpModule dependencies initialized +0ms
App 1242274 output: [Nest] 1242274 - 02/18/2021, 8:38:19 PM [InstanceLoader] TypeOrmCoreModule dependencies initialized +90ms
App 1242274 output: [Nest] 1242274 - 02/18/2021, 8:38:19 PM [InstanceLoader] TypeOrmModule dependencies initialized +11ms
App 1242274 output: [Nest] 1242274 - 02/18/2021, 8:38:19 PM [InstanceLoader] AppModule dependencies initialized +17ms
App 1242274 output: Running DB migrations if necessary
App 1242274 output: (node:1242274) UnhandledPromiseRejectionWarning: QueryFailedError: ER_CANT_DROP_FIELD_OR_KEY: Can't DROP 'tosAndPrivacyAcceptedDate'; check that column/key exists
App 1242274 output: (node:1242274) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
App 1242274 output: (node:1242274) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Could it be that the app is unable to reach the database? I've seen this error happen in such cases, although it could be something else.

Also, you can try starting the app with the TR_MAIL_DEBUG=true env var to log emails to the terminal, that way you won't have that SMTP config warning.

I don't believe it's DB connection - I think it's something with migrations. I fixed this manually adding tosAndPrivacyAcceptedDate field to the table. After this migration which was doing drop passed =)

I tested with the latest builds and all works well, closing for now.