Closed ph55 closed 4 years ago
Hi all,
I'm relabeling this as an enhancement instead of a bug. We do not yet incorporate multi-level dependency information into the generation of libs. So I am just labeling this as an enhancement to differentiate between providing new functionality and fixing existing functionality.
Related to #528
Nothing created with following command.
ng g lib grid1 --routing --lazy --prefix=ngx --parent-module=libs/dashboard/src/lib/dashboard.module.ts --tags=child-module
Sample app to reproduce: https://github.com/xmlking/ngx-starter-kit
Env:
"@nrwl/schematics": "^6.2.0",
Angular CLI: 6.1.2
Node: 10.7.0
OS: darwin x64
Angular: 6.1.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.7.2
@angular-devkit/build-angular 0.7.2
@angular-devkit/build-ng-packagr 0.7.2
@angular-devkit/build-optimizer 0.7.2
@angular-devkit/build-webpack 0.7.2
@angular-devkit/core 0.7.2
@angular-devkit/schematics 0.7.2
@angular/cdk 6.4.3
@angular/cdk-experimental 6.4.3
@angular/cli 6.1.2
@angular/flex-layout 6.0.0-beta.17
@angular/material 6.4.3
@angular/material-moment-adapter 6.4.3
@angular/pwa 0.7.2
@ngtools/json-schema 1.1.0
@ngtools/webpack 6.1.2
@schematics/angular 0.7.2
@schematics/update 0.7.2
ng-packagr 4.0.1
rxjs 6.2.2
typescript 2.9.2
looks like above issue happens when we upgrade "@angular-devkit/build-angular": "^0.7.2",
if we rollback to ~~ ~~ "@angular-devkit/build-angular": "^0.6.8" routing/lazy works.
actually the issue is with typescript 2.9.2. after downgrading to 2.7.2 it looks like working !
Folks. I'm going to close this issue. The new loadChildren syntax doesn't require you to update tsconfig files.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
If lib added as
--lazy
and--parent-module
specified as lib and not as app - no changes totsconfig.app.json
andtsconfig.e2e.json
would be written.Include should be added. Otherwise error thrown on serve:
Steps to reproduce:
Error fixed by manually adding following line to
tsconfig.app.json
include: