Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng serve error when loading a lazy module that holds itself lazy routed submodules #13142

Closed
Aphax opened this issue Dec 6, 2018 · 2 comments

Comments

@Aphax
Copy link

Aphax commented Dec 6, 2018

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [X] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

node --version
v8.11.3

npm --version
5.6.0

ng --version

Angular CLI: 6.2.7
Node: 8.11.3
OS: win32 x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

Package Version

@angular-devkit/architect 0.8.8
@angular-devkit/build-angular 0.8.8
@angular-devkit/build-ng-packagr 0.10.7
@angular-devkit/build-optimizer 0.8.8
@angular-devkit/build-webpack 0.8.8
@angular-devkit/core 0.8.8
@angular-devkit/schematics 0.8.7
@angular/cdk 6.4.7
@angular/cli 6.2.7
@angular/material 6.4.7
@ngtools/json-schema 1.1.0
@ngtools/webpack 6.2.8
@schematics/angular 0.8.7
@schematics/update 0.8.7
ng-packagr 4.4.0
rxjs 6.3.3
typescript 2.7.2
webpack 4.16.4

Windows 10

Repro steps

git clone https://github.com/Aphax/angular6-lib-lazy-submodule

cd angular6-lib-lazy-submodule
ng build admin
npm run start

The log given by the failure

ERROR in Could not resolve module ./users/users.module relative to /C/Workspace/angular6-libtest/dist/admin/admin.d.ts

Desired functionality

It should be possible to have nested lazy modules without any error output on ng serve.

Mention any other details that might be useful

It seems that admin.d.ts tries to resolve paths of lazy routes, the problem is that its position within the folder structure is different than the routing module in the source folders. (one level above out of lib/ folder).

Why admin.d.ts isn't put in lib/ folder instead ?

@Aphax
Copy link
Author

Aphax commented Dec 6, 2018

Sorry duplicate with #13143 (github bug 404 error when publishing this issue, thought it was lost)

@Aphax Aphax closed this as completed Dec 6, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant