This repository shows a bug that the mikro-orm cli has when being used in the nx monorepo environment (and most likely other environments using the compilerOption > paths option in the tsconfig)
$ git clone [email protected]:RiskChallenger/nx-mikro-orm-cli.git
$ cd nx-mikro-orm-cli
$ yarnThis will reproduce the error message.
$ yarn mikro-orm debugTo prevent the error you can open the following file
apps/api/src/app/ModuleType.ts
In the file you find documentation on what the different import paths will give as output.
One of the things that could be the problem is that exporting a type is alright by TypeScript, but exporting a const is not. However, when running (and building the code) there is no problem with this.