angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Angular CLI v6: "Unknown option: '--environment'"

Open moloch-- opened this issue 8 years ago • 23 comments

Versions

Angular CLI: 6.0.0
Node: 10.0.0
OS: darwin x64
Angular: 6.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.0
@angular-devkit/build-angular     0.6.0
@angular-devkit/build-optimizer   0.6.0
@angular-devkit/core              0.6.0
@angular-devkit/schematics        0.6.0
@ngtools/webpack                  6.0.0
@schematics/angular               0.6.0
@schematics/update                0.6.0
rxjs                              6.1.0
typescript                        2.7.2
webpack                           4.7.0

Repro steps

  • Install Angular v6 / CLI v6
  • ng build --environment=foo

Observed behavior

The build --environment CLI option does not work in v6 (or was removed?), however the documentation hasn't been updated to reflect the new way to build environments?

➜  web git:(ng-v6) ng build --environment=local
Unknown option: '--environment'

ng build --help Does not have any obvious replacement flags or information on how to specify environments during the build.

Desired behavior

Any of:

  • Updated documentation
  • Backwards compatibility (and warnings for deprecated cli flags in prior versions)
  • Fix --environment

Mention any other details that might be useful (optional)

I know Angular CLI is a complicated project, but if you could push one update without breaking every existing project (and project build scripts/CI/CD) that rely on things like --environment= that'd be great, ng update doesn't seem to address things like this.

moloch-- avatar May 06 '18 13:05 moloch--

My comment was sarcastic FYI. I don't even remember what this issue was I work on mobile apps now lol.

KthProg avatar Mar 29 '19 13:03 KthProg

It would still be nice to have an alias or warning about deprecated cli flag.s

I really don't like how angular treats its community

kkdg avatar Jul 10 '19 22:07 kkdg

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.