Skip to content

AOT: Compilation sometimes fails on serve #2900

Closed
@seeruk

Description

@seeruk

OS?

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

Mac OSX 10.11.6 (El Capitan)

Versions.

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

$ ng --version
angular-cli: 1.0.0-beta.18
node: 6.9.1
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.

The app was created with the CLI tool. I created a completely fresh, brand-new project, ran $ ng serve --aot, and then made a (any) change to a file. At this point, the browser reloads, and sometimes the error shown below is given.

The log given by the failure.

Normally this include a stack trace and some more information.

Note, this doesn't happen every time. It seems like it's only sometimes, randomly. Perhaps a race condition?

style_sanitizer.js:95 Uncaught Error: Module build failed: Error: ENOENT: no such file or directory, open '/Users/seer/git/github.com/SeerUK/angular2-cli-issue-test/src/app/app.module.ngfactory.ts'(…)(anonymous function) @ style_sanitizer.js:95__webpack_require__ @ bootstrap 03ed31e…:52(anonymous function) @ main.ts:8__webpack_require__ @ bootstrap 03ed31e…:52(anonymous function) @ zone.js:1428__webpack_require__ @ bootstrap 03ed31e…:52webpackJsonpCallback @ bootstrap 03ed31e…:23(anonymous function) @ main.bundle.js:1
client:38 [WDS] Errors while compiling.
client:80 ./src/app/app.module.ngfactory.ts
Module build failed: Error: ENOENT: no such file or directory, open '/Users/seer/git/github.com/SeerUK/angular2-cli-issue-test/src/app/app.module.ngfactory.ts'
    at Error (native)
 @ ./src/main.ts 4:0-64
 @ multi main

Mention any other details that might be useful.

N/A currently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Impacts a large percentage of users; if a workaround exists it is partial or overly painful

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions