angular-cli: [1.5.0-rc.5] Failed to load templateUrl path when enabling hmr

Bug Report or Feature Request (mark with an x)

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

Versions.

Angular CLI: 1.5.0-rc.6
Node: 8.6.0
OS: linux x64
Angular: 5.0.0-rc.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.5.0-rc.6
@angular-devkit/build-optimizer: 0.0.31
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.34
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0-rc.6
@schematics/angular: 0.0.48
typescript: 2.5.3
webpack: 3.8.1

Repro steps.

The log given by the failure.

selection_103

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 24 (20 by maintainers)

Commits related to this issue

Most upvoted comments

I can confirm that (locally) the fixes I have in https://github.com/angular/angular-cli/pull/8215 together with changing the bootstrap as I mention in https://github.com/angular/angular-cli/issues/8234#issuecomment-340202362 make all the scenarios that previously worked in 1.4.9 also work in 1.5.0 (https://github.com/angular/angular-cli/issues/8234#issuecomment-340186316).

I’m still working out the kinks out of that PR but it should be good to go for the next release. Thanks for bearing with me while I debug this.

I’m working on these errors (and others) in https://github.com/angular/angular-cli/pull/8215.

It looks like there’s some problem in the bootstrap replacement as you mentioned.

// doesn't work
const bootstrap = () => platformBrowserDynamic().bootstrapModule(AppModule);

// works
function bootstrap () {
  return platformBrowserDynamic().bootstrapModule(AppModule);
}