Any fix to this error?

Admin UI built successfully
[2023-03-10 23:59:59.500] debug: :no_entry: Server wasn’t able to start properly.
[2023-03-10 23:59:59.501] error: Unknown dialect undefined
Error: Unknown dialect undefined
at getDialectClass (C:\Users\Azhar Ellahi\OneDrive\Desktop\Portfolio\strapi\api\node_modules@strapi\database\lib\dialects\index.js:12:13)
at getDialect (C:\Users\Azhar Ellahi\OneDrive\Desktop\Portfolio\strapi\api\node_modules@strapi\database\lib\dialects\index.js:19:23)
at new Database (C:\Users\Azhar Ellahi\OneDrive\Desktop\Portfolio\strapi\api\node_modules@strapi\database\lib\index.js:31:20)
at Function.Database.init (C:\Users\Azhar Ellahi\OneDrive\Desktop\Portfolio\strapi\api\node_modules@strapi\database\lib\index.js:116:14)
at Strapi.bootstrap (C:\Users\Azhar Ellahi\OneDrive\Desktop\Portfolio\strapi\api\node_modules@strapi\strapi\lib\Strapi.js:413:30)
at Strapi.load (C:\Users\Azhar Ellahi\OneDrive\Desktop\Portfolio\strapi\api\node_modules@strapi\strapi\lib\Strapi.js:484:16)
at async Strapi.start (C:\Users\Azhar Ellahi\OneDrive\Desktop\Portfolio\strapi\api\node_modules@strapi\strapi\lib\Strapi.js:215:9)

Welcome to the community may i suggest you also post your node version, npm/yarn version and strapi version so people can help better :slightly_smiling_face:

Hey there!

This issue (though the error log isn’t very clear) is actually a database issue. Please make sure that the database specified in config/database.js exists, and you can connect to it using the credentials you provided. If you have any other questions, feel free to tag me! :slight_smile:

Happy coding!

~ Thom

You see it happens every few days. I host new server and it works and then after few days same error. Don’t know what is causing it. I am hosting it locally.

Again what version of strapi are you on.
Also if you are hosting it locally how are you hosting it ?
Docker, Nginx, Apache etc ?

@Eventyret Sorry for the confusion by locally I mean localhost. I am using version 3.7.1.