angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

change default style ext

Open soraliu opened this issue 8 years ago • 4 comments

Versions

Angular CLI: 6.0.0
Node: 8.11.2
OS: darwin x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.0
@angular-devkit/core         0.6.0
@angular-devkit/schematics   0.6.0
@schematics/angular          0.6.0
@schematics/update           0.6.0
rxjs                         6.2.0
typescript                   2.7.2

Repro steps

  • exec ng config schematics.@schematics/angular:component.styleext scss -g as the official doc said stories-css-preprocessors

Observed behavior

Invalid JSON character: "s" at 0:0.
Error: Invalid JSON character: "s" at 0:0.
    at _readValue (/usr/local/lib/node_modules/@angular/cli/node_modules/@angular-devkit/core/src/json/parser.js:567:19)
    at parseJsonAst (/usr/local/lib/node_modules/@angular/cli/node_modules/@angular-devkit/core/src/json/parser.js:605:17)
    at Object.parseJson (/usr/local/lib/node_modules/@angular/cli/node_modules/@angular-devkit/core/src/json/parser.js:631:12)
    at normalizeValue (/usr/local/lib/node_modules/@angular/cli/commands/config.js:128:19)
    at ConfigCommand.set (/usr/local/lib/node_modules/@angular/cli/commands/config.js:195:23)
    at ConfigCommand.run (/usr/local/lib/node_modules/@angular/cli/commands/config.js:168:18)
    at /usr/local/lib/node_modules/@angular/cli/models/command-runner.js:278:30
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/@angular/cli/models/command-runner.js:4:58)
    at <anonymous>

Desired behavior

don't throw error

Mention any other details that might be useful (optional)

soraliu avatar May 27 '18 16:05 soraliu

but when i exec ng new scss-project --style=scss, it works

soraliu avatar May 28 '18 06:05 soraliu

I have the same problem when trying to change existing project from css to scss by executing: ng config defaults.styleExt scss

Error:

Invalid JSON character: "s" at 0:0. Error: Invalid JSON character: "s" at 0:0. at _readValue (/Volumes/MIXTOU/Projects/HistopathPlatform/web/HistoPathPlatformUI/node_modules/@angular/cli/node_modules/@angular-devkit/core/src/json/parser.js:567:19) at parseJsonAst (/Volumes/MIXTOU/Projects/HistopathPlatform/web/HistoPathPlatformUI/node_modules/@angular/cli/node_modules/@angular-devkit/core/src/json/parser.js:605:17) at Object.parseJson (/Volumes/MIXTOU/Projects/HistopathPlatform/web/HistoPathPlatformUI/node_modules/@angular/cli/node_modules/@angular-devkit/core/src/json/parser.js:631:12) at normalizeValue (/Volumes/MIXTOU/Projects/HistopathPlatform/web/HistoPathPlatformUI/node_modules/@angular/cli/commands/config.js:128:19) at ConfigCommand.set (/Volumes/MIXTOU/Projects/HistopathPlatform/web/HistoPathPlatformUI/node_modules/@angular/cli/commands/config.js:195:23) at ConfigCommand.run (/Volumes/MIXTOU/Projects/HistopathPlatform/web/HistoPathPlatformUI/node_modules/@angular/cli/commands/config.js:168:18) at /Volumes/MIXTOU/Projects/HistopathPlatform/web/HistoPathPlatformUI/node_modules/@angular/cli/models/command-runner.js:278:30 at Generator.next (<anonymous>) at fulfilled (/Volumes/MIXTOU/Projects/HistopathPlatform/web/HistoPathPlatformUI/node_modules/@angular/cli/models/command-runner.js:4:58)

` Angular CLI: 6.0.5 Node: 10.1.0 OS: darwin x64 Angular: 6.0.3 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, platform-server, router

Package Version

@angular-devkit/architect 0.6.3 @angular-devkit/build-angular 0.6.3 @angular-devkit/build-optimizer 0.6.3 @angular-devkit/core 0.6.3 @angular-devkit/schematics 0.0.46 @angular/cdk 6.1.0 @angular/cli 6.0.5 @angular/flex-layout 6.0.0-beta.15 @angular/material 6.1.0 @ngtools/json-schema 1.1.0 @ngtools/webpack 6.0.3 @schematics/angular 0.6.5 @schematics/schematics 0.0.13 @schematics/update 0.6.5 rxjs 6.2.0 typescript 2.7.2 webpack 4.8.3`

mixtou avatar May 29 '18 08:05 mixtou

Resolved via #10956 and will be in the next patch release.

clydin avatar May 29 '18 12:05 clydin

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.