Angular-cli: ng new --style=sass generates scss files

Created on 1 Feb 2019  ·  5Comments  ·  Source: angular/angular-cli

🐞 Bug report

Command (mark with an x)

- [x] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Did not test it on versions prior to 7.3.0

Description

When generating a new app and selecting sass from the prompt, scss files are generated.
Also the angular.json file tries to reference styles.sass which does not exist.

🔬 Minimal Reproduction

ng new app
routing -> no
styles -> sass

🔥 Exception or Error

No Error, but when running `ng serve´ inside newly generated app it thows this error:


ERROR in multi ./src/styles.sass
Module not found: Error: Can't resolve '/Users/frank/Development/ng-test/src/styles.sass' in '/Users/frank/Development/ng-test'
ℹ 「wdm」: Failed to compile.

🌍 Your Environment



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 7.3.0
Node: 8.11.4
OS: darwin x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.13.0
@angular-devkit/core         7.3.0
@angular-devkit/schematics   7.3.0
@schematics/angular          7.3.0
@schematics/update           0.13.0
rxjs                         6.3.3
typescript                   3.2.2

screenshot 2019-02-01 at 20 47 47

Most helpful comment

@ageisen2000, no that is indeed a bug and has been addressed in https://github.com/angular/angular-cli/pull/13552

All 5 comments

This is the indented behaviour see https://github.com/angular/angular-cli/pull/13444 for more context.

Thanks for your response @alan-agius4.
What about the angular.json file; The main stylesheet, styles.scss, is referenced as styles.sass which leads to an error when trying to run or build the app.

@alan-agius4 how is a broken template intended behavior? I've never had to edit files before being able to serve a brand new template before

@ageisen2000, no that is indeed a bug and has been addressed in https://github.com/angular/angular-cli/pull/13552

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

daBishMan picture daBishMan  ·  3Comments

JanStureNielsen picture JanStureNielsen  ·  3Comments

delasteve picture delasteve  ·  3Comments

gotschmarcel picture gotschmarcel  ·  3Comments

jmurphzyo picture jmurphzyo  ·  3Comments