Skip to content

Errors from production mode does not appears on development mode #6013

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

Closed
calebeaires opened this issue Apr 19, 2017 · 7 comments
Closed

Errors from production mode does not appears on development mode #6013

calebeaires opened this issue Apr 19, 2017 · 7 comments

Comments

@calebeaires
Copy link

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/[email protected]
MacOS

Repro steps.

ng build --prod

The log given by the failure.

ng: gaio-front/src/app/views/studio/canvas/canvas-tree/canvas-tree.component.html (349,6): Property 'showRemoveProcessModal' does not exist on type 'CanvasTreeComponent'.

Desired functionality.

When build the app, this erros is printed on terminal/console. It would be helpfully if this errors appears on dev mode too.

  1. Why this errors does not show on ng serve, but shows on ng build --prod?
  2. How make this erros show on development mode too(ng serve)?
@sumitarora
Copy link
Contributor

@calebeaires Is there a repo I can take a look at?

@calebeaires
Copy link
Author

calebeaires commented Apr 19, 2017

@sumitarora, thanks for your help!

My team is working on a private repo right now, even if it is an open source project. But, about this issue, I release that this is related to variables that have been declared on template (html) but not on component (private/public properties)

Maybe it is related to this issue: Error with build --prod & templates since angular/cli 1.0.

So, how to make angular-cli show thoses errors via a development server mode, not only on build --prod time.

@sumitarora
Copy link
Contributor

@calebeaires I see this has been merged in master but yet to be release. You can try using the master branch and see if error still exists or not.

@clydin
Copy link
Member

clydin commented Apr 19, 2017

You can enable AOT (--aot) for development which should generate any errors related to the compilation of the templates. Please note this will significantly increase rebuild times.

@filipesilva
Copy link
Contributor

@calebeaires such errors only happen during AOT compilation, which is used for production builds. I agree it's a nasty surprise to find new errors when doing prod builds, but the alternative would be to use AOT all the time and as @clydin said this would massively increase rebuild times.

@NeelBhatt
Copy link

Is there any way I can suppress those errors occurred only with AOT compilation? For example, there is an error comes with --prod but if I try to fix that error, it breaks my functionality, is there a way to suppress specific error and allow the build to pass in --prod?

@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants