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

ng build --prod warning is confusing #20806

Closed
1 task done
StephenFluin opened this issue May 15, 2021 · 3 comments · Fixed by #20818
Closed
1 task done

ng build --prod warning is confusing #20806

StephenFluin opened this issue May 15, 2021 · 3 comments · Fixed by #20818
Assignees
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity1: confusing type: bug/fix
Milestone

Comments

@StephenFluin
Copy link
Contributor

🐞 Bug report

Command (mark with an x)

  • build

Is this a regression?

Yes, as part of the new default for ng build.

Description

Previously developers were expected to run ng build --prod, when you do so now you get the warning $ ng build --prod Option "--prod" is deprecated: Use "--configuration production" instead., but this warning is confusing. As a developer I'm not actually supposed to use --configuration production, but instead ng build. Perhaps we could mention the new default?

🔬 Minimal Reproduction

npx @angular/cli new my-app
cd my-app
ng build --prod

🔥 Exception or Error


Option "--prod" is deprecated: Use "--configuration production" instead.

## 🌍 Your Environment


Angular CLI: 12.0.0
Node: 14.16.0
Package Manager: yarn 1.22.10
OS: linux x64

Angular: 12.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.13
@angular-devkit/build-angular   12.0.0
@angular-devkit/core            12.0.0
@angular-devkit/schematics      12.0.0
@angular/fire                   6.1.4
@schematics/angular             12.0.0
rxjs                            6.6.7
typescript                      4.2.4

@itea-dev
Copy link

I was thinking the same.

@alan-agius4 alan-agius4 added area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity1: confusing type: bug/fix labels May 16, 2021
@alan-agius4
Copy link
Collaborator

For new projects which the defaultConfiguration is production we should try to display a different message.

@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 Jun 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity1: confusing type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants