Skip to content

when use SystemJsNgModuleLoader, cannot find module #5981

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

Closed
vivian7169 opened this issue Apr 17, 2017 · 4 comments
Closed

when use SystemJsNgModuleLoader, cannot find module #5981

vivian7169 opened this issue Apr 17, 2017 · 4 comments

Comments

@vivian7169
Copy link

Bug Report or Feature Request (mark with an x)

- [ bug report ]
ERROR Error: Uncaught (in promise): Error: Cannot find module './app/example/template/test-template/test-template.module'.

### Versions.
@angular/cli: 1.0.0
node: 6.9.4
os: darwin x64

### Repro steps.
when load dynamic module, using SystemJsNgModuleLoader.load(this.path), in browser inspect, got this error: "ERROR Error: Uncaught (in promise): Error: Cannot find module "'./app/example/template/test-template/test-template.module'
files path:
-src/app/example/template/test-template/test-template.module.ts
-src/app/example/example.component.ts

In example.component.ts, I tried to use this.path as below but all cannot work :
1. src/app/example/template/test-template/test-template.module
2. app/example/template/test-template/test-template.module
3. ./app/example/template/test-template/test-template.module
4. ./template/test-template/test-template.module

### Mention any other details that might be useful.
Does angular-cli allow us to load a module dynamically?

Thanks.

@elainaRenee
Copy link

I am having this issue as well

@oparisy
Copy link

oparisy commented Apr 28, 2017

Same thing. I cannot seem to be able to dynamically load an external module.

By "external" I mean "not available to angular-cli during the ng build phase" (but independently compiled using tsc).

@filipesilva
Copy link
Contributor

I think this isn't supported, roughly for the same reason as custom routers are not supported: #4541.

I'll refer your issue there as this is part of a bigger topic.

@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 7, 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

4 participants