I am converting an angular app to angular lib. I generated angular lib project and slowly moving the modules. I now get the following error while building the library.
ng build lib
Error
Cannot read property 'module' of undefined
TypeError: Cannot read property 'module' of undefined
at MetadataBundler.convertSymbol (C:\Code\abc\client\node_modules\@angular\compiler-cli\src\metadata\bundler.js:312:61)
at createReference (C:\Code\abc\client\node_modules\@angular\compiler-cli\src\metadata\bundler.js:438:27)
at MetadataBundler.convertReference (C:\Code\abc\client\node_modules\@angular\compiler-cli\src\metadata\bundler.js:486:28)
at MetadataBundler.convertExpression (C:\Code\abc\client\node_modules\@angular\compiler-cli\src\metadata\bundler.js:415:37)
at C:\Code\abc\client\node_modules\@angular\compiler-cli\src\metadata\bundler.js:364:79
at Array.map (<anonymous>)
at MetadataBundler.convertMember (C:\Code\abc\client\node_modules\@angular\compiler-cli\src\metadata\bundler.js:364:47)
at C:\Code\abc\client\node_modules\@angular\compiler-cli\src\metadata\bundler.js:349:70
at Array.map (<anonymous>)
at MetadataBundler.convertMembers (C:\Code\abc\client\node_modules\@angular\compiler-cli\src\metadata\bundler.js:349:38)
Typically this error is caused when trying to register dependencies incorrectly in the module. How can I find, which part of my configuration makes this exception?
It works fine in angular app.
ng generate library my-lib
first? – Immobility--watch
flag? – Immobility--buildEventLog=buildEventLog
option – Immobility