Angular 9 library: Dependency from main entrypoint to secondary

Viewed 1652

We have a corporate library that is being upgraded from angular 8.2.x to 9.0.6 I already disabled ivy for prd builds, so thats fine.

The project structure goes al follows:

  • projects
    • my-ui-lib
      • src
        • public_api.ts
        • folder-with-some-components-that-use-utility-methods
      • common
        • src
          • public_api.ts
          • folder-with-utility methods

Building my-ui-lib gives no problems at all. Using my-ui-lib in a project gives the following error:

ERROR in The target entry-point "@my/ui" has missing dependencies: - @my/ui/common

This did not happen on angular 8.2.x. What am i doing/migrated wrongfully?

1 Answers

I had a similar case upgrading a project with multiple dependent libraries from Angular@8 latest to Angular@9 latest.

My issue was that building @my/ui/common alone (using ng build @my/ui/common) resulted in errors (particularly the usage of attribute [overlapTrigger]="false" for component mat-menu. After fixing that, the missing dependencies error disappeared.

I know that this is maybe a different case than yours, but maybe this is helpfull for others.

Related