Angular-cli: Unknown option: '--verbose'

Created on 1 Jun 2018  Â·  8Comments  Â·  Source: angular/angular-cli

Versions

Angular CLI: 6.0.7
Node: 8.9.0
OS: win32 x64
Angular: 6.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.7
@angular-devkit/build-angular     0.6.7
@angular-devkit/build-optimizer   0.6.7
@angular-devkit/core              0.6.7
@angular-devkit/schematics        0.6.7
@angular/cli                      6.0.7
@ngtools/webpack                  6.0.7
@schematics/angular               0.6.7
@schematics/update                0.6.7
rxjs                              6.2.0
typescript                        2.7.2
webpack                           4.8.3

Repro steps

  • ng new myapp
  • ng serve --verbose

Observed behavior

Unknown option: '--verbose'

Desired behavior

Expect to serve the app successfully.

Mention any other details that might be useful (optional)

It work's on the following configuration:

Angular CLI: 6.0.0
Node: 8.9.0
OS: win32 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.6.0
devkibuild-angular low regression bufix

Most helpful comment

Same with ng build projectName --verbose

ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / â–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 6.0.7
Node: 8.10.0
OS: linux x64
Angular: 6.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.6.5
@angular-devkit/build-angular      0.6.5
@angular-devkit/build-ng-packagr   0.6.5
@angular-devkit/build-optimizer    0.6.5
@angular-devkit/core               0.6.7
@angular-devkit/schematics         0.6.7
@angular/cli                       6.0.7
@ngtools/json-schema               1.1.0
@ngtools/webpack                   6.0.5
@schematics/angular                0.6.7
@schematics/update                 0.6.7
ng-packagr                         3.0.0-rc.5
rxjs                               6.2.0
typescript                         2.7.2
webpack                            4.8.3

Running ng build without specifying a project name works ng build --verbose
When specifying a project name it no longer works

ng build my-lib --verbose
Unknown option: '--verbose'

Why would I want more logging for an already verbose output...we'll, when building my library the build silently dies and I have no idea what is wrong.. "The build worked fine yesterday..."

ng build my-lib
Building Angular Package

Command is done and nothing is built

All 8 comments

@mnicic --verbose option is not available with ng serve command in angular CLI 6.
Please find below option that are available in Angular CLI 6

ng serve -h
usage: ng serve [options]
options:
--aot
Build using Ahead of Time compilation.
--base-href
Base url for the application being built.
--browser-target
Target to serve.
--common-chunk
Use a separate bundle containing code used across multiple bundles.
--configuration (-c)
Specify the configuration to use.
--deploy-url
URL where files will be deployed.
--disable-host-check
Don't verify connected clients are part of allowed hosts.
--eval-source-map
Output in-file eval sourcemaps.
--hmr
Enable hot module replacement.
--hmr-warning
Show a warning when the --hmr option is enabled.
--host
Host to listen on.
--live-reload
Whether to reload the page on change, using live-reload.
--open (-o)
Opens the url in default browser.
--optimization
Defines the optimization level of the build.
--poll
Enable and define the file watching poll time period in milliseconds.
--port
Port to listen on.
--prod
Flag to set configuration to "prod".
--progress
Log progress to the console while building.
--proxy-config
Proxy configuration file.
--public-host
Specify the URL that the browser client will use.
--serve-path
The pathname where the app will be served.
--serve-path-default-warning
Show a warning when deploy-url/base-href use unsupported serve path values.
--source-map
Output sourcemaps.
--ssl
Serve using HTTPS.
--ssl-cert
SSL certificate to use for serving HTTPS.
--ssl-key
SSL key to use for serving HTTPS.
--vendor-chunk
Use a separate bundle containing only vendor libraries.
--watch
Rebuild on change.

Hm... The official documentation says that the command still exists. See this wiki page.

Also, I did use it in previous revision of Angular CLI 6 (see the end of my question).

Same with ng build projectName --verbose

ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / â–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 6.0.7
Node: 8.10.0
OS: linux x64
Angular: 6.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.6.5
@angular-devkit/build-angular      0.6.5
@angular-devkit/build-ng-packagr   0.6.5
@angular-devkit/build-optimizer    0.6.5
@angular-devkit/core               0.6.7
@angular-devkit/schematics         0.6.7
@angular/cli                       6.0.7
@ngtools/json-schema               1.1.0
@ngtools/webpack                   6.0.5
@schematics/angular                0.6.7
@schematics/update                 0.6.7
ng-packagr                         3.0.0-rc.5
rxjs                               6.2.0
typescript                         2.7.2
webpack                            4.8.3

Running ng build without specifying a project name works ng build --verbose
When specifying a project name it no longer works

ng build my-lib --verbose
Unknown option: '--verbose'

Why would I want more logging for an already verbose output...we'll, when building my library the build silently dies and I have no idea what is wrong.. "The build worked fine yesterday..."

ng build my-lib
Building Angular Package

Command is done and nothing is built

Same with ng build projectName --verbose and with ng build projectName --show-circular-dependencies.

But ng build --help shows them as options:

usage: ng build <project> [options]
options:
...
  --show-circular-dependencies
    Show circular dependency warnings on builds.
...
  --verbose
    Adds more details to output logging.
...

but you can still specify it in angular.json file:

"options": {
    "verbose": true
}

@pavel-agarkov Right, it's another approach. But it's not solution for me.

@pavel-agarkov's suggestion can't be used in a library. options: verbose is valid only on applications.

ng build --verbose (using default project, @trojanc's suggestion) is not working for me on @angular/cli 6.1.5.

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._

Was this page helpful?
0 / 5 - 0 ratings