Skip to content

cannot set the port with *ng config*  #10900

Closed
@web-dave

Description

@web-dave

Versions

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

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.1
@angular-devkit/build-angular     0.6.1
@angular-devkit/build-optimizer   0.6.1
@angular-devkit/core              0.6.1
@angular-devkit/schematics        0.6.1
@angular/cli                      6.0.1
@ngtools/webpack                  6.0.1
@schematics/angular               0.6.1
@schematics/update                0.6.1
rxjs                              6.1.0
typescript                        2.7.2
webpack                           4.6.0

Repro steps

  • decide to set the port to a custom value and don't wanna use ng serve --port 77777
  • ng config projects.ng-blog.architect.serve.options.port 77777
  • error
  • ng config projects["ng-blog"].architect["serve"].options.port 77777
  • error
  • ng config projects["ng-blog"].architect["serve"].options.port "77777"
  • error

Observed behavior

Unexpected end of file.
Error: Unexpected end of file.
    at _readValue (C:\workspace\ng-blog\node_modules\@angular-devkit\core\src\json\parser.js:582:13)
    at parseJsonAst (C:\workspace\ng-blog\node_modules\@angular-devkit\core\src\json\parser.js:657:15)
    at Object.parseJson (C:\workspace\ng-blog\node_modules\@angular-devkit\core\src\json\parser.js:684:10)
    at normalizeValue (C:\workspace\ng-blog\node_modules\@angular\cli\commands\config.js:128:19)
    at ConfigCommand.set (C:\workspace\ng-blog\node_modules\@angular\cli\commands\config.js:195:23)
    at ConfigCommand.run (C:\workspace\ng-blog\node_modules\@angular\cli\commands\config.js:168:18)
    at C:\workspace\ng-blog\node_modules\@angular\cli\models\command-runner.js:278:30
    at Generator.next (<anonymous>)
    at fulfilled (C:\workspace\ng-blog\node_modules\@angular\cli\models\command-runner.js:4:58)

Desired behavior

I expect that I can set the port

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions