I'm facing an issue where sometimes when I import a module it returns as undefined.
It's not a directly issue with the module, I already tested unitarily BUT when i try to run it togheter, some modules come as undefined.
I've already read some posts about circular deps and issues relation with NodeJS, tried to use madge
to prevent and detect circular deps but still with problem.
Lets say I have an folder called entities
Inside entities folder, I have a couple entities in this format:
//user.entity.ts file
export class User { ... }
//group.entity.ts file
export class Group { ... }
//permission.entity.ts file
export class Permission {...}
point is:
User has Groups and Permissions as props.
Group has Permissions as props.
Permission has no deps
When it resolves, User can access Groups and Permissions, and Group cant access Permissions (it returns undefined).
Any tips?