3
votes

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
I have this exactly same issue and couldn't find any other solution besides enabling ivy in my 'my-ui-lib' project tsconfig.lib.prod.json file. This is against what Angular documentation suggest though and according to the documentation ivy should be disabled in shared libraries for now. I'm looking for a solution where ivy can remain disabled on the library project because of this. - Sami Viitala
but this causes my library not being able to be pushed to our corporate npm registry :). - dendimiiii
I just faced the same issue now when trying to publish to our npm feed, so this is not a viable workaround after all. - Sami Viitala

1 Answers

0
votes

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.