1

When running ng build for my Clarity Design based application I get the following error (this is all the output):

ERROR in Symbol ClarityModule declared in /Users/moo/code/test3/node_modules/@clr/angular/clr-angular.module.d.ts is not exported from @clr/angular (import into /Users/moo/code/test3/projects/demoapp/src/app/ui/ui.module.ts)

  • The application is building correctly on an older checkout of the same codebase, so I am quite sure this is related to the versions of (peer) dependencies like Angular, Clarity Design System or Node

  • The application is using a library that also imports Clarity Module

I am trying to specifically pinpoint why and where Angular thinks ClarityModule is exported to get down what is causing this error and why it does not happen on another development deployment.

How can I get further information on this build error and fix it? This is the only line outputted by ng build so I am hoping to find some instructions on how to make it more verbose, or even a potential fix.

Angular is

Angular CLI: 9.0.7
Node: 12.16.1
OS: darwin x64

Angular: 9.0.7
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.900.7
@angular-devkit/build-angular      0.900.7
@angular-devkit/build-ng-packagr   0.900.7
@angular-devkit/build-optimizer    0.900.7
@angular-devkit/build-webpack      0.900.7
@angular-devkit/core               9.0.7
@angular-devkit/schematics         9.0.7
@ngtools/webpack                   9.0.7
@schematics/angular                9.0.7
@schematics/update                 0.900.7
ng-packagr                         9.0.3
rxjs                               6.5.4
typescript                         3.7.5
webpack                            4.41.2
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435

1 Answers1

1

I could not solve this issue - how to find out what trips the error in the source code.

However as per the comment, the build works if you disable Ivy compiler

  • Set aot: false in angular.json of the main app

  • Set enableIvy: false in tsconfig.json of the main app

More information about Ivy compiler options here: How do I enable Ivy for Angular 8 or 9?

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435