Skip to content

Build --watch failing on rebuild #8332

@barnatoth

Description

@barnatoth

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
Node: 8.1.0
OS: darwin x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cdk: 2.0.0-beta.12
@angular/cli: 1.5.0
@angular/flex-layout: 2.0.0-beta.10
@angular/material: 2.0.0-beta.12
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.0
typescript: 2.6.1
webpack: 3.8.1

Repro steps.

  1. Run in terminal: ./node_modules/.bin/ng build --aot --env=dev --watch
  2. -> The build is successful
  3. Add a new line to any source file
  4. The build will throw an error:
ERROR in Error: Debug Failure. False expression: Host should not return a redirect source file from `getSourceFile`
    at tryReuseStructureFromOldProgram (/node_modules/typescript/lib/typescript.js:72100:26)
    at Object.createProgram (/node_modules/typescript/lib/typescript.js:71808:34)
    at AngularCompilerProgram._createProgramWithBasicStubs (/node_modules/@angular/compiler-cli/src/transformers/program.js:431:29)
    at /node_modules/@angular/compiler-cli/src/transformers/program.js:144:28
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:169:7)

The log given by the failure.

ERROR in Error: Debug Failure. False expression: Host should not return a redirect source file from `getSourceFile`
    at tryReuseStructureFromOldProgram (/node_modules/typescript/lib/typescript.js:72100:26)
    at Object.createProgram (/node_modules/typescript/lib/typescript.js:71808:34)
    at AngularCompilerProgram._createProgramWithBasicStubs (/node_modules/@angular/compiler-cli/src/transformers/program.js:431:29)
    at /node_modules/@angular/compiler-cli/src/transformers/program.js:144:28
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:169:7)

Desired functionality.

Adding a new line shouldn't break the build

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions