'Getting 'Cannot read property 'ɵmod' of undefined' when importing custom module

I've built and published a custom components library, kept in Artifactory, to install into my app? I'm getting the following error after I install the library, when the app loads. Like nothing renders, just this error message...

core.js:1139 Uncaught TypeError: Cannot read properties of undefined (reading 'ɵmod') at getNgModuleDef (core.js:1139) at recurse (core.js:25270) at recurse (core.js:25281) at registerNgModuleType (core.js:25266) at new NgModuleFactory$1 (core.js:25380) at compileNgModuleFactory__POST_R3__ (core.js:28993) at PlatformRef.bootstrapModule (core.js:29239) at Module.zUnb (main.ts:11) at webpack_require (bootstrap:79) at Object.0 (main.js:11)

I have seen the stackoverflow stating to "return the module" by adding... but I have no idea what file it needs to be added to.

{ path: 'auth', loadChildren: () => import('./auth/auth.module') .then((a) => { return a.AuthModule; }); },

And I have confirmed the proper folders are packaged when the library is built as mentioned in this stackoverflow

Also, this is my import statement, that I feel is wrong. But I get a compile error if I use "@myOrg_amf/amf-library"

import { AmfLibraryModule, MaterialModule } from '@myOrg_amf/amf-library/projects/amf-library/src/public-api';

Thank you for any advice you can give on this.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source