Skip to content

Core module changes break compilation #4353

@samalexander

Description

@samalexander

OS?

macOS Sierra (10.12.3)

Versions.

angular-cli: 1.0.0-beta.28.3
node: 6.9.2
os: darwin x64
@angular/common: 2.4.5
@angular/compiler: 2.4.5
@angular/core: 2.4.5
@angular/forms: 2.4.5
@angular/http: 2.4.5
@angular/platform-browser: 2.4.5
@angular/platform-browser-dynamic: 2.4.5
@angular/router: 3.4.5
@angular/compiler-cli: 2.4.5

Repro steps.

Our app was created using the angular-cli and has a core module, as documented here. The app compiles successfully when running ng serve. Changes to any files outside of the core module cause the app to recompile, which completes successfully. However, changes to any files inside the core module cause recompilation, which fails with the error below. All subsequent changes that trigger recompilation will then also fail.

I am currently trying to reproduce this in a basic new project. I will link here if successful.

The log given by the failure.

ERROR in ./src/app/core/auth.service.ts
Module build failed: RangeError: Maximum call stack size exceeded
    at Array.filter (native)
    at _diagnoseDeps (/Users/sam/Developer/ng-project/node_modules/@ngtools/webpack/src/loader.js:261:10)
    at /Users/sam/Developer/ng-project/node_modules/@ngtools/webpack/src/loader.js:264:9
    at Array.forEach (native)
    at _diagnoseDeps (/Users/sam/Developer/ng-project/node_modules/@ngtools/webpack/src/loader.js:262:10)
    at /Users/sam/Developer/ng-project/node_modules/@ngtools/webpack/src/loader.js:264:9
    at Array.forEach (native)
    at _diagnoseDeps (/Users/sam/Developer/ng-project/node_modules/@ngtools/webpack/src/loader.js:262:10)
    at /Users/sam/Developer/ng-project/node_modules/@ngtools/webpack/src/loader.js:264:9
    at Array.forEach (native)
***repeated a few hundred times, removed for brevity***
 @ ./src/app/app.component.ts 13:0-50
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://localhost:4200/ ./src/main.ts

Mention any other details that might be useful.

We believe this issue has been introduced by angular-cli v1.0.0-beta.28.3, since it works with v1.0.0-beta.26.

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