Skip to content

[Bug] Webpack hangs when requiring external templates/css inside components with an app-shell project #1502

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
juristr opened this issue Jul 31, 2016 · 5 comments

Comments

@juristr
Copy link
Contributor

juristr commented Jul 31, 2016

OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

OSX El Capitan

Versions. Please run ng --version. If there's nothing outputted, please run
in a Terminal: node --version and paste the result here:

Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: local (v1.0.0-beta.10, branch: master)
node: 5.6.0
os: darwin x64

Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.

Generate a new app targeted for mobile with app-shell and stuff using ng new testapp --mobile. That installs just fine and runs. Then add a new component like ng g component demo. That works as well, however if you then import that generated <app-demo> component in app.component.ts and run ng serve, webpack hangs with this message:

...
16ms hashing
1ms module assets processing
92ms chunk assets processing
25ms additional chunk assets processing
0ms recording
0ms additional asset processing
182ms chunk asset optimization
 94% asset optimizationwebpack: wait until bundle finished: /app/demo.component.html

After a while I get an exception from zone.js:

EXCEPTION: Failed to load app/demo.component.html
ngOnInit Error: Failed to load app/demo.component.html
Unhandled Promise rejection: Failed to load app/demo.component.html ; Zone: <root> ; Task: Promise.then ; Value: Failed to load app/demo.component.html
{ [Error: Uncaught (in promise): Failed to load app/demo.component.html]
  rejection: 'Failed to load app/demo.component.html',
...

Mention any other details that might be useful.

This entire workflow above runs perfectly when generating a "plain normal" project without the app-shell.

@juristr juristr changed the title [Bug] Loading [Bug] Webpack hangs when requiring external templates/css inside components with an app-shell project Jul 31, 2016
@sirajc
Copy link

sirajc commented Jul 31, 2016

You haven't linked cli when you created a new app ng new testapp --mobile, it should be ng new testapp --mobile --link-cli when you are using local copy. You can now run npm link angular-cli. Then serve and see if anything changes

@juristr
Copy link
Contributor Author

juristr commented Jul 31, 2016

@sirajc Hmm...I'll try. I linked the cli afterwards with npm link angular-cli, but not with the --link-cli flag when generating the project. Also, didn't have to do this when generating a non-mobile project with the CLI. What does --link-cli do?

@juristr
Copy link
Contributor Author

juristr commented Jul 31, 2016

@sirajc Ok, deleted my project, retried with the --link-cli flag, but didn't change. Still having the same issue

@filipesilva
Copy link
Contributor

Dupe of #1371

@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants