-
Notifications
You must be signed in to change notification settings - Fork 12k
New version of cli ng build --prod
gives error.
#5733
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
Comments
Hi, |
Hi, |
I have these after upgrading form angular cli beta into version 1.0. |
Hi, I had the same issue when running ng build --aot --prod -sm false. ` @angular/cli: 1.0.0 ` |
@ginkosen
As you can see Supplied parameters do not match any signature of call target. |
I also can't find the ngfactory files after build errors. |
I am having this issue as well. Is there a way to find that ngfactory file? |
@webcat12345 Thx , I check my code again , and i find the problem and slove. |
Problem is some npm packages are having same issues. They should be upgraded to latest angular and angular/cli version since we are using Angular4 and angular/cli 1.0.0. |
why ng serve and ng build (without --prod option) are OK ?!!!!! |
make the property hours,test_detail_mode,statistic public. |
I am having issues with The errors are along the lines of: and
Typescript compiles cleanly, I have looked at the "don'ts" page. It also works perfectly in either build or serve with A lot of other people seem to be having similar issues: If we could get a better error message, or have the option of saving the files somewhere to inspect maybe it would be a little less opaque. |
I hope this is of help to someone out there, wondering why their recently updated angular4(...but only moments ago, angular2) project won't build without throwing this decipherable message Aha...ok...thanks for that! What ever could you mean?...First of all, I don't own a factory...ahem!
Strangely enough, I still get an error.....(error: unknown option `--silent' ) but IT STILL BUILDS! Hope this saves someone an hour. |
I love the CLI, guys! Can you write the generated files in --edit: this is actually a webpack-related question. When AoT compilation files, one can read the source files in browser with: http://localhost:4200/src/app/app.component.ts ➡️ HTTP 200 but the generated files are not: |
same problem with cli 1.0.0, but I downgrade to 1.0.0-rc4 and it works without errors. |
So just wanted to add my 2cents (australian, not sure how much that is US). We were struggling with these problems and it is I think not reasonable for ng serve to work and then have build issues but I probably just don't have enough fingers in the pie's of Angular/cli to know how it all hangs together, anyway. We are now running everything at latest, 4.1.0 and CLI 1.0.1. We updated all of our dependant packages of which thankfull we don't have many but some awesome people had already upgraded their projects to use Angular 4, some olders are still not updated but are working fine. ng serve and prod build now all work fine, so I think we were stuck in a loop of cli version mismatching with angular version and also some 3rd party packages. I did go through and change custom filters we had created to ensure the right number of parameters were matching. I know this could be a big step for some people but for us it was worth it and 2 of us sat down with a strong cup of tea and knocked it over in 2 hours. Just got 1 package that a previous developer got from somewhere which has to be completely replaced. |
I'm sorry but this issue really is a duplicate of #5623. The fix for the outstanding errors really is to fix your templates (e.g. change the variables that are private and need to be accessed in templates to public). As mentioned in #5623 these really are AOT errors and it was a CLI bug that they weren't reported before. We agree that it's a very bad experience to non-AOT builds to work, but then for AOT builds to not work. The plan for the future is to have AOT builds be fast enough they can be used even during development so this doesn't happen anymore, but we're not there yet. |
I think the main problem here is not that the build breaks but the fact that we get no info about where it breaks. My error was in some package I was using. Tracking that down is just a big PITA. |
#5601 gives better error reporting. We just need to be alittle patient for it to be released. Maybe a 1.0.2 ? |
Not sure if this was mentioned, but I found "private": true in package.json. After removing this line and restarting the app, ng build worked for me |
Me, personally that seems like "possibly" a good way to hide certain behaviour, without reading I don't know what that setting does, I would prefer to have everything up to date and building correctly which just took us a bit of time. I have total faith in the team because they fixing things very well as they come up on subsequent minor releases and we are very happy with what is coming out. |
This link wasvery helpful |
We have fixed all private methods and variables that were called from html
and now it builds perfect.
…On May 16, 2017 1:42 PM, "Ian Sam Mungai" ***@***.***> wrote:
This link wasvery helpful
https://github.com/qdouble/angular-webpack2-starter#aot--donts
Still have a problem using pipes
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5733 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQ65fet0aKaf6D6MkAMCRhqqaUv_hNcVks5r6YuQgaJpZM4MtGxa>
.
|
@iansamz By pipes do you mean pipes used to transform data or do you mean pipes used to indicate that parameters may be of several types (aka | as an OR operator)? If it's the later, see this comment #5623 (comment) |
@ben-coble-sp fixed it just an error on my side |
I'm still error with this issue. $ ng --version I'm not sure, Is is another solution instead of change private to public? |
I had an error in my templates which only showed up when building with --aot. I Isolated it by removing template to make sure that's where it was and then just searching through the events until I found calls that didn't match the signatures of their methods. Once, I fixed that, it compiled with --aot. Would have been better to have a more helpful error message. |
I had the following case: with "ng build -prod" failed with: In app modules had:
and
I've found that working version:
|
xxx How do we make Just upgraded to latest angular-cli 1.2.7 (but was having the same issues right before with 1.0.0-beta30 as well)
This last error is coming from html template where we do I'm fine fixing these, but HOW do I get Backstory: We used to use part of
|
You can replicate this problem, by creating a brand new simple empty project, with this sequence:
The apparent solution then is to make the variable |
From other threads, you can work around the problem. Meaning, you CAN use Tested with my Angular Hack, which is not optimal and does not carry over on reinstalls.
and pin those versions.... OR A better workaround is to use
without the I tested both with a large project, and I no longer get those ~400+ errors about Thanks to @filipesilva and @adwd |
So, Out of the box What is the long term solution going to be? Anyone know? Do we at least agree this should have a resolution? I see 3 possibilities to fix this:
Question: today, is there a flag I can use on |
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. ??? Can we somehow keep the $$_gendir around? Is there some log file that it spits out? I have no clue what it is complaining about and I've spent about 5 hours looking through all the code and there is a lot of it. |
i have error like this how to solve this error "dependencies": { |
For anyone stuck on an old version of Angular and winds up here with this issue: we worked around it by adding a fake build step to our unit tests. In our workflow, this will throw the error before a push, or at the worst throw the error on the test step before it gets all the way to the production build. Something like this (package.json):
This does make running the unit tests much slower, but at least stops the embarrassment of a surprise breaking of the production build. |
The issue in my case was that My component was running, Stopped it and ran " ng build --prod --aot" and it worked. |
help I have a problem problem mark me this error when I put the command Date: 2019-06-26T19:47:29.429Z ERROR in scripts.000eefc49a6f20ab379c.js from Terser |
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
Versions.
Output from:
ng --version
.Repro steps.
Nothing changed.
Problem is happening after upgrading CLI version to rc.2.
I read the issue #5623 , but it is closed without any solution. It is nearly impossible to change all properties to public, because project is too big.
I tried to change, but I gave up now.
Strange thing is build on Github through Codeship is succeed. How is it possible? And why not on local?
The log given by the failure.
Desired functionality.
Is there anyway to upgrade codebase without changing all issues by manually?
Migrating all issues line by line is too pain for us, also creating
getter, setter
is same for us.Mention any other details that might be useful.
I think if this error is too critical then CLI should gives error on ng serve or ng build.
Thank you very much.
The text was updated successfully, but these errors were encountered: