I think this is a bug in Nestjs, and it does not only applies to the Enums, also similar problems happens to other forms of file importing.