Closed fabioformosa closed 6 years ago
Hello,
which version of ngx-admin-lte did you installed?
2.0.0-beta.10
and what is your "ng --version" ?
I tried with this package.json here: https://github.com/TwanoO67/bootstraping-ngx-admin-lte/blob/develop/package.json
And the problem doesn't seem to appear, so I suppose it's related to some dependencies versions
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
I'm able to build bootstraping-ngx-admin-lte
but not this simple-kaishi that includes ngx-admin-lte and kaishi that includes ngx-admin-lte too.
Are you on the "develop" branche of bootstraping-ngx-admin-lte ? because the 'master' branche is still on ngx-admin-lte v1
And the "develop" branch, use the new "@angular/cli": "~6.0.0-beta.5"
bootstraping-ngx-admin-lte
is ok... it's build fine. But I'm not using it, I'm using ngx-admin-lte
.
My error is when I try to build a project (simple-kaishi) that uses a core library (kaishi) that uses ngx-admin-lte
.
bootstraping-ngx-admin-lte
-> ngx-admin-lte
simple-kaishi
-> kaishi
-> ngx-admin-lte
I'm in the case 2, not in case 1. I don't understand why build fails due to ngx-admin-lte
if there is a third level in the project structure.
if you want reproduce:
kaishi>
npm installkaishi>
npm run packagr simple-kaishi>
npm installsimple-kaishi>
npm link ../kaishi/distsimple-kaishi>
npm start -> it should be oksimple-kaishi>
npm run build... build fails!As said it's seems to be related to a sub dependencies.
Try updating to new @angular/cli
Also look if you have a different version installed in your projet and globally on your computer.
latest version in both.
@TwanoO67 , I get the same error also in bootstraping-ngx-admin-lte
.
Could you try to run npm run prod
? Let's me know.
The error, for me, is:
ERROR in : Unexpected value 'undefined' declared by the module 'NgxAdminLteModule in git/bootstraping-ngx-admin-lte/node_modules/ngx-admin-lte/ngx-admin-lte.d.ts'
@TwanoO67 Can you at least roll another beta version ? I am eagerly anticipating the fix for AOT which Fabio solved.
@fabioformosa
With ng 1.7.3 and 1.7.4 you still need to build this way to work around the error you mention:
ng build --target production --sourcemaps false --aot false
You can leave out sourcemaps, but you have to force non-AOT mode.
Good luck!
@TwanoO67 It is not an option to use beta version for production systems. I am referring to using ng CLI 6.0.0-beta.
@catull I've just tried ngx-admin-lte 2.0.0-beta11 in my proj and I can confirm now I successfull build it with --prod
option (that's --aot=true) and ng CLI 1.7.3.
@TwanoO67 thank you for release. I'm going to close this issue.
I'm trying to build my proj that includes ngx-admin-lte
ng build --prod
and I get the following error:
ERROR in : Unexpected value 'undefined' declared by the module 'NgxAdminLteModule in simple-kaishi/node_modules/kaishi/node_modules/ngx-admin-lte/ngx-admin-lte.d.ts'
why?