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

cannot set the port with *ng config* #10900

Closed
web-dave opened this issue May 17, 2018 · 2 comments · Fixed by #10905
Closed

cannot set the port with *ng config* #10900

web-dave opened this issue May 17, 2018 · 2 comments · Fixed by #10905

Comments

@web-dave
Copy link

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

@web-dave
Copy link
Author

I tried

ng config projects["ng-blog"].architect["serve"].options {port:77777}

and it worked, but browserTarget was deleted

@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 Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants