-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Dump compiled factories #5619
Comments
how can I temporarry fix this
get more inputs from console ? cause donno how fix that
|
as work around, I am adding
in `node_modules/@ngtools/webpack/src/plugins.js here:
|
Could a flag be added for that (i.e. |
@valorkin Thanks for showing us that! I ended up modifying your code so that the file name generated has the same line number and character position as the error. I also didn't add the additional error message to the top of the file as that throws off the line number count and instead just put the error message on the same line. Here's that code incase someone finds it useful.
And the comment it makes to the file
|
+1 for the --keep-gendir flag |
Thanks @valorkin and @JacobBrandt for the @ngtools/webpack patch. Incidentally, it will dump out log files if you run |
Is this issue fixed and released? As reported by @achimha while raising the issue, it is now very difficult to spot the offending code in a module that has been working for months. |
I have found that with angular 4.2.x, error reporting is much improved and most of the time, the offending line in the template is pointed out. While it was mostly guess work before, I haven't felt the need to inspect a compiled factory in quite some time. |
I did not find 4.2x to give clearer messages. The error was cause for me by the output event on the component html (myEvent)="myEvent($event)" called a method in the component typescript: myEvent(). Changing it to be: (myEvent)="myEvent()" solved this issue. |
Okay so how again are we suppose to figure out where the problem is if we have a: ERROR in C:/.../src/$$_gendir/app/app.module.ngfactory.ts (159,52): Supplied parameters do not match any signature of call target. ??? I don't see the file mentioned by @JacobBrandt in any file named plugin.js . I am using the CLI and running ng build --prod and ng serve --aot and both of them through this ambiguous error. |
@wakawaka54 You're looking for this file. |
Closing as this is obsolete. Since factory files are no longer generated with Ivy. |
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. |
Bug Report or Feature Request (mark with an
x
)Versions.
angular-cli 1.0.0
angular 2.4.10
Repro steps.
With the latest bugfix that uncovered AOT errors, I noticed how hard it is to pinpoint those errors. The reason is that all we get is an error during compilation like this:
The offending file is transient and cannot be inspected. Due to the recently fixed bug, the code error has been there for a long time and it is now very difficult to spot the offending code in a module that has been working for months.
Desired functionality.
There should be a way to inspect (= keep) the transient file to get a better idea what the AOT compiler complains about.
The text was updated successfully, but these errors were encountered: