'Error: Cannot resolve type entity i10.BidiModule to symbol while building angular Lib project Angular 13

I am facing Error: Cannot resolve type entity i10.BidiModule to symbol while building angular Lib project. There are 2 other lib projects which are building fine. This new lib project works well without flex layout and material. But when I use flex layout or material in this project I got below error. I have search a lot. There is solution like including "preserveSymlinks": true in tsconfig.lib.json. Unfortunately its not working for me. Any help on this will be welcome.

enter image description here



Solution 1:[1]

I ran into this very same issue today. I had a library project for Angular 13 and after adding the @angular/flex-layout as a dependency, I could no longer build the library with the exact same error as you.

I managed to fix the problem by adding @angular/cdk as a dependency to my library. I found this information on the flex layout github page, where they install both of these libraries in the "Getting Started" section.

I did not change any other configuration files.

Sources

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

Source: Stack Overflow

Solution Source
Solution 1 Minop