Replies: 2 comments 2 replies
-
Looking at the stack trace, the import is coming from the ORM config, no? Some notes about how to deal with bundlers are here https://mikro-orm.io/docs/deployment And indeed, things like this can be usually worked around by changing the bundler config - don't expect those things to be fixable from the other end, this needs to be fixed in your next project (probably in its webpack config if that's what they use). I am no webpack expert, can't help much with those things. |
Beta Was this translation helpful? Give feedback.
-
Yeah it's coming from the config, the Migrator extension. When I remove it the warning goes away. I'll try to do some webpack tuning and see if I can manage something. Meanwhile I'm curious what you think about the following workaround. A lighter config for the app to load ( const configMinimal: Options = {
driver: PostgreSqlDriver,
dbName: 'demo_db',
clientUrl: 'postgresql://localhost:5432',
entities: [/*...*/],
metadataProvider: ReflectMetadataProvider,
discovery: { disableDynamicFileAccess: true },
debug: true,
}; And the complete config that gets loaded by the CLI when running migrations const config: Options = {
...configMinimal,
migrations: {
path: process.cwd() + '/migrations',
transactional: true,
disableForeignKeys: true,
allOrNothing: true,
emit: 'ts',
},
extensions: [SeedManager, Migrator],
}; |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm playing around and trying to integrate Mikro ORM in a new Next.js project (App Router) and I'm running into some warnings. If I understand them correctly they seem to come from Mikro ORM dependencies, rather than Mikro ORM itself, in combination with the next.js compiler. But still I thought I'd ask here if anybody else ran into it and/or if there's a fix that I haven't found.
Here's the console output when the Page compiles in dev mode:
I'm running:
6.2.2
14.2.2
18.3.3
(integrated monorepo)As this looks to be triggered by Migrator, maybe there's a way to disable the Migrator when running the app, and having it on only when running migration commands?
Beta Was this translation helpful? Give feedback.
All reactions