Reproduction
The Module import graph contains a cycle:
src/app.module.ts
import { Module, createApp } from 'func'
import type { ModuleMetadata } from 'func'
const first: ModuleMetadata = {}
const second: ModuleMetadata = { imports: [first] }
first.imports = [second]
@Module({ imports: [first] })
class AppModule {}
createApp(AppModule)How to fix it
Follow details.dependencyPath to the import that returns to an earlier Module. Extract shared Providers into a third Module and let the original Modules import it in one direction instead of importing each other. When only a TypeScript type is needed, use a type-only import and do not add it to Module.imports.