I'm trying to build my angular5 proj but it fails.
This is an excerpt of deps tree:
simple-kaishi <- kaishi <- ngx-admin-lte
ngx-admin-lte: (develop branch) is the angular version of popular adminlte theme
kaishi : (master branch) is a my core-library that includes ngx-admin-lte and adds other core features.
simple-kaishi : (master branch) is my sample project that includes kaishi
To reproduce:
- clone kaishi
- kaishi>
npm install
- kaishi>
npm run packagr
to package kaishi as a feature library - clone simple-kaishi
- simple-kaishi>
npm install
- simple-kaishi>
npm link ../kaishi/dist
- simple-kaishi>
npm start
it should be ok - simple-kaishi>
npm run build
build fails!
Build error is
ERROR in : Unexpected value 'undefined' declared by the module 'NgxAdminLteModule in /git/simple-kaishi/node_modules/kaishi/node_modules/ngx-admin-lte/ngx-admin-lte.d.ts'
What's the matter?
-- details --
my ng -- version
Angular CLI: 1.7.3
Node: 8.10.0
OS: win32 x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.7.3
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
+++ UPDATE +++
I've noticed that problem arises for ng build --prod
but not for ng build
.
My proj structure is not the cause, but the cause is around the external lib ngx-admin-lte