Skip to content
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

AOT: Compilation sometimes fails on serve #2900

Closed
seeruk opened this issue Oct 26, 2016 · 5 comments · Fixed by #2992
Closed

AOT: Compilation sometimes fails on serve #2900

seeruk opened this issue Oct 26, 2016 · 5 comments · Fixed by #2992
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful

Comments

@seeruk
Copy link

seeruk commented Oct 26, 2016

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.

@sime
Copy link
Contributor

sime commented Oct 26, 2016

I have the same problem since this morning.

I believe it is something to do with the codebase? If I create a fresh project, with ng new I don't get the error.

@seeruk
Copy link
Author

seeruk commented Oct 26, 2016

It doesn't happen every time, but it definitely happened on a completely new, fresh project. The only thing I changed was "app works!" to "app doesn't work!".

To add a tiny bit more information here, I'm using a 15" mid-2014 Retina MacBook Pro (base model). I was inside of a tmux session. I use iTerm2 v3, and fish shell.

@sime
Copy link
Contributor

sime commented Oct 26, 2016

Strange, now it is working for me without a problem.

@alexbyk
Copy link

alexbyk commented Oct 29, 2016

Can confirm the same error happens when some file is changed, than goes away when I save a file a second/third time.

Uncaught Error: Module build failed: Error: ENOENT: no such file or directory, open '/home/foo/projects/bar/src/app/app.module.ngfactory.ts'

Very annoying bug.

@filipesilva filipesilva added feature: aot P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful labels Nov 2, 2016
hansl added a commit to hansl/angular-cli that referenced this issue Nov 3, 2016
Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2900
hansl added a commit to hansl/angular-cli that referenced this issue Nov 3, 2016
Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2900
hansl added a commit to hansl/angular-cli that referenced this issue Nov 3, 2016
Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2900
hansl added a commit to hansl/angular-cli that referenced this issue Nov 3, 2016
Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2900
hansl added a commit to hansl/angular-cli that referenced this issue Nov 3, 2016
Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2900
hansl added a commit to hansl/angular-cli that referenced this issue Nov 3, 2016
Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2900
hansl added a commit to hansl/angular-cli that referenced this issue Nov 3, 2016
Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2900
hansl added a commit to hansl/angular-cli that referenced this issue Nov 3, 2016
Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2900
hansl added a commit to hansl/angular-cli that referenced this issue Nov 3, 2016
Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2900
hansl added a commit to hansl/angular-cli that referenced this issue Nov 3, 2016
Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

Also fix e2e tests.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2900
hansl added a commit to hansl/angular-cli that referenced this issue Nov 3, 2016
Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

Also fix e2e tests.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2735
Fixes angular#2900
hansl added a commit to hansl/angular-cli that referenced this issue Nov 3, 2016
Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

Also fix e2e tests.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2735
Fixes angular#2900
hansl added a commit to hansl/angular-cli that referenced this issue Nov 3, 2016
Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

Also fix e2e tests.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2735
Fixes angular#2900
hansl added a commit that referenced this issue Nov 3, 2016
…2992)

Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

Also fix e2e tests.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes #2452
Fixes #2735
Fixes #2900
MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this issue Feb 9, 2017
…ngular#2992)

Before, we were using paths relative to base at all time, but these
might not be the paths we get in System.import(), therefore we have to
keep the relative path.

Also fix e2e tests.

BREAKING CHANGES: Using relative paths might lead to path clashing. We
now properly output an error in this case.

Fixes angular#2452
Fixes angular#2735
Fixes angular#2900
@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.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants