Angular-cli: Wiki: Continuous Integration Story: "Unknown option" errors

Created on 6 May 2018  Â·  6Comments  Â·  Source: angular/angular-cli

Versions


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


Angular CLI: 6.0.0
Node: 8.9.2
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-ng-packagr   0.6.0
@angular-devkit/build-optimizer    0.6.0
@angular-devkit/core               0.6.0
@angular-devkit/schematics         0.6.0
@ngtools/json-schema               1.1.0
@ngtools/webpack                   6.0.0
@schematics/angular                0.6.0
@schematics/update                 0.6.0
ng-packagr                         3.0.0-rc.2
rxjs                               6.1.0
typescript                         2.7.2
webpack                            4.6.0

Repro steps

Observed behavior

Instead of running end-to-end tests, it prints this error:

> [email protected] e2e S:\Programming\git repositories\ng-app-state
> ng e2e "--no-progress" "--config=protractor-ci.conf.js"

Unknown option: '--progress'

Desired behavior

It should run the end-to-end tests.

Mention any other details that might be useful (optional)

Removing the --no-progress flag causes it to complain that --config is an unknown option. This is also a problem for the line above it in the file: npm run test -- --single-run --no-progress --browser=ChromeNoSandbox

devkibuild-angular low inconvenient bufix docs

Most helpful comment

Its been documented elsewhere that --single-run is gone, but nothing about e2e dropping support for --no-progress Why are these changes being released without deprecation warnings?

All 6 comments

I m getting similar issue with below command

ng test --code-coverage --single-run

Unknown option: '--singleRun'

Its been documented elsewhere that --single-run is gone, but nothing about e2e dropping support for --no-progress Why are these changes being released without deprecation warnings?

Update: after some experimentation, I've come close to making this work. The new equivalent of --config=__ is --protractor-config=___. For the other command, the new equivalent of --single-run is --watch=false. I tried --progress=false in place of --no-progress, but I didn't notice any difference, so I just dropped the flag entirely. Here are my new lines:

script:
  # Use Chromium instead of Chrome.
  - export CHROME_BIN=chromium-browser
  - xvfb-run -a yarn test --code-coverage --watch=false --browsers=ChromeNoSandbox
  - xvfb-run -a yarn e2e --protractor-config=e2e/protractor-ci.conf.js

The last line now works :tada:. However, the line above it still given an error:

Cannot load browser "ChromeNoSandbox": it is not registered!

Update: I got it all working. My remaining issue was that I defined ChromeNoSandbox in the wrong karma.conf.js file (I have nested projects). The commands above work for me.

What I found is that your can run any command like ng test or ng e2e and add --help and it will print all the available options for v6 and I don't see anything related to progress, this flag has moved inside angular.json file under build-angular:dev-server options.

@ersimont Tip: You don't need xvfb to run Chrome anymore, you can use the headless version like so --browsers=ChromeHeadless and if you also need the no-sandbox flag you can add a customLaunchers inside your karma.conf file, based on ChromeHeadless and add that flag

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

Related issues

brtnshrdr picture brtnshrdr  Â·  3Comments

MateenKadwaikar picture MateenKadwaikar  Â·  3Comments

sysmat picture sysmat  Â·  3Comments

JanStureNielsen picture JanStureNielsen  Â·  3Comments

IngvarKofoed picture IngvarKofoed  Â·  3Comments