What happened?
When using MySQL, Mikro-ORM can't create migration due the following error :
TypeError: Cannot read properties of undefined (reading 'BOT_OWNER_ID')
at Object.<anonymous> (C:\Users\Josh\Documents\Projects\RoseBot\src\configs\general.ts:8:15)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Module.m._compile (C:\Users\Josh\Documents\Projects\RoseBot\node_modules\ts-node\src\index.ts:1618:23)
at node:internal/modules/cjs/loader:1698:10
at Object.require.extensions.<computed> [as .ts] (C:\Users\Josh\Documents\Projects\RoseBot\node_modules\ts-node\src\index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1303:32)
at Function._load (node:internal/modules/cjs/loader:1117:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
at Module.require (node:internal/modules/cjs/loader:1325:12)
Credit : @JoshCantCode
Cf : Discord support thread
Reproduction
- Init a new bot
- Setup
.env file
- Change database config to use a MySQL database
- Run any Mikro-ORM command
Code of Conduct
What happened?
When using MySQL, Mikro-ORM can't create migration due the following error :
Credit : @JoshCantCode
Cf : Discord support thread
Reproduction
.envfileCode of Conduct