Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upAngular >= 5.1.0-rc.0 regression in AOT compilation error reporting #20781
Comments
|
@Sky4CE Can you produce a repository that reproduces the error? What was the text of the error you received in 5.1.0-beta-2 and how is it different than 5.1.0-rc.1? Also, it would be more helpful if you included the entire text of the error instead of just a screen shot of part of it. |
|
@chuckjaz , the point is that in 5.1.0-rc.0 and 5.1.0-rc.1 the text always the same regardless of error I have, it can be any error, it always states that it cannot find main app module factory while in beta-2 it was precise error about the problem, i.e. some parameters could not be resolved in constructor or some properties is private but used on template etc, and it points to exact file with problem: |
|
I am not seeing the same thing. Can you create a repository I can clone that produces the error message you are seeing. I will then test this against 5.1.0-beta.1 and 5.1.0-rc.1 and see the difference. BTW, In the future, please refrain from using images captures of your screen; pasting the text from the console is usually sufficient. |
|
@chuckjaz I have prepared reproduction repo for you, it uses angular-cli and barrels system. In fact problem related to this bug , I've found it when testing different kind of errors and current problem with insufficient error message appears with barrels bug. Please make sure you restoring |
|
@chuckjaz , any progress on this? I saw v5.1.0 has been released, I tested it and saw that this bug didn't resolved, that's very disappointed. This situation force me to stay on 5.1.0-beta2 |
|
@Sky4CE THANK YOU! Error: ./src/app/main.ts |
|
I also faced similar issue and using @Sky4CE and @Andrey-Pavlov solution to go back to 5.1.0-beta.2 helped show correct error message due to issue with missing @Inject tag for locale. I wanted to give example I ran into. before:
with 5.1 I received the aot strange error message ERROR in ./src/main.ts after
ERROR in Error: Can't resolve all parameters for NegativeNumberPipe in pipes/custom-pipe.pipe.ts: (?). |
|
I've converted the reproduction into an The good news is that this test passes on |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |

I'm submitting a...
Current behavior
When building with AOT I get very general error which is useless a bit more than completely.

P.S.: Version 5.1.0-beta.2 shows proper error message in this particular case.
Expected behavior
Error should describe root of the problem with proper stacktrace.
Minimal reproduction of the problem with instructions
reproduction repository (make sure you're on
5.1.0-rc.0-regressionbranch)to run:
ng build --aot=trueorng build --prodEnvironment