ng-packagr: BUILD ERROR - When adding clarity package

Type of Issue

[ ] Bug Report


## Description

Unable to complete the build when adding clarity as a package in the application package. 

I have tried adding clarity to externals in ng-package.json but still build fails.


#### How To Reproduce

Please use this repo - https://github.com/keshav1007/ng-packagr

 - Do yarn install
 - Do yarn packagr

Error : 

![image](https://user-images.githubusercontent.com/20353796/41396828-c1f08706-6fcf-11e8-9188-acdadc6af0fb.png)

BUILD ERROR
(1,1): : Directive ɵcb, Property 'block' does not exist on type 'ClrDatagridColumnToggleButton'.
node_modules/@clr/angular/clr-angular.d.ts.ClrHeader.html(6,13): : Property 'NAV_LEVEL_1' does not exist on type 'ResponsiveNavCodes'.
node_modules/@clr/angular/clr-angular.d.ts.ClrHeader.html(14,13): : Property 'NAV_LEVEL_2' does not exist on type 'ResponsiveNavCodes'.

Error: (1,1): : Directive ɵcb, Property 'block' does not exist on type 'ClrDatagridColumnToggleButton'.
node_modules/@clr/angular/clr-angular.d.ts.ClrHeader.html(6,13): : Property 'NAV_LEVEL_1' does not exist on type 'ResponsiveNavCodes'.
node_modules/@clr/angular/clr-angular.d.ts.ClrHeader.html(14,13): : Property 'NAV_LEVEL_2' does not exist on type 'ResponsiveNavCodes'.

    at Object.<anonymous> (/Users/keshavs/test/test-ngPackagr/node_modules/ng-packagr/lib/ngc/compile-source-files.js:53:68)
    at next (native)
    at /Users/keshavs/test/test-ngPackagr/node_modules/ng-packagr/lib/ngc/compile-source-files.js:7:71
    at __awaiter (/Users/keshavs/test/test-ngPackagr/node_modules/ng-packagr/lib/ngc/compile-source-files.js:3:12)
    at Object.compileSourceFiles (/Users/keshavs/test/test-ngPackagr/node_modules/ng-packagr/lib/ngc/compile-source-files.js:19:12)
    at Object.<anonymous> (/Users/keshavs/test/test-ngPackagr/node_modules/ng-packagr/lib/ng-v5/entry-point/ts/compile-ngc.transform.js:26:32)
    at next (native)
    at /Users/keshavs/test/test-ngPackagr/node_modules/ng-packagr/lib/ng-v5/entry-point/ts/compile-ngc.transform.js:7:71
    at __awaiter (/Users/keshavs/test/test-ngPackagr/node_modules/ng-packagr/lib/ng-v5/entry-point/ts/compile-ngc.transform.js:3:12)
    at exports.compileNgcTransform.transform_1.transformFromPromise (/Users/keshavs/test/test-ngPackagr/node_modules/ng-packagr/lib/ng-v5/entry-point/ts/compile-ngc.transform.js:17:75)

error An unexpected error occurred: "Command failed.



#### Expected Behaviour

Build should success.

#### Version Information

$ node_modules/.bin/ng-packagr --version ng-packagr: 3.0.2 @angular/*: 5.0.0 typescript: 2.4.2 rxjs: 5.5.2 node: 6.11.3 npm/yarn: 1.5.1


About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 27 (13 by maintainers)

Most upvoted comments

A BIG BIG BIG thanks to you… my bad i exported only in the module and not in the public_api… it works fine now… AOT build is also working properly… thanks a lot 👍