Skip to content

Unable to set configuration in .angular-cli.json in the apps section with ng set apps.0 #5298

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

Closed
johnpapa opened this issue Mar 8, 2017 · 1 comment · Fixed by #5301
Closed

Comments

@johnpapa
Copy link
Contributor

johnpapa commented Mar 8, 2017

OS

Mac OSX 10.12.3

Versions.

$ ng -v
@angular/cli: 1.0.0-rc.1
node: 6.9.1
os: darwin x64
@angular/common: 4.0.0-rc.2
@angular/compiler: 4.0.0-rc.2
@angular/core: 4.0.0-rc.2
@angular/flex-layout: 2.0.0-rc.1
@angular/forms: 4.0.0-rc.2
@angular/http: 4.0.0-rc.2
@angular/material: 2.0.0-beta.2
@angular/platform-browser: 4.0.0-rc.2
@angular/platform-browser-dynamic: 4.0.0-rc.2
@angular/router: 4.0.0-rc.2
@angular/cli: 1.0.0-rc.1
@angular/compiler-cli: 4.0.0-rc.2

Repro steps.

Try to set the configuration in .angular-cli.json with:

ng set apps.0.prefix foo

This yields an error.

So do ng set apps[0]prefix foo and ng set apps[0]prefix "foo"

Error

$ ng set apps.0.prefix foo
Unexpected token o in JSON at position 1
SyntaxError: Unexpected token o in JSON at position 1
    at Object.parse (native)
    at resolve (/Users/john/_play/angular-hello/node_modules/@angular/cli/commands/set.js:62:39)
    at Class.run (/Users/john/_play/angular-hello/node_modules/@angular/cli/commands/set.js:37:16)
    at Class.<anonymous> (/Users/john/_play/angular-hello/node_modules/@angular/cli/ember-cli/lib/models/command.js:134:17)
    at process._tickCallback (internal/process/next_tick.js:103:7)
@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants