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

Regression in 7.3.0 when choosing SASS as preprocessor #13550

Closed
wkurniawan07 opened this issue Jan 31, 2019 · 7 comments · Fixed by #13552
Closed

Regression in 7.3.0 when choosing SASS as preprocessor #13550

wkurniawan07 opened this issue Jan 31, 2019 · 7 comments · Fixed by #13552

Comments

@wkurniawan07
Copy link

wkurniawan07 commented Jan 31, 2019

🐞 Bug report

Command (mark with an x)

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

Is this a regression?

Yes, the previous version in which this bug was not present was: All 7.x before 7.3.0

Description

When choosing Sass as the stylesheet preprocessor, CLI produces styles.scss but angular.json expects styles.sass.
Previous available choice of "Scss" is gone.

🔬 Minimal Reproduction

  1. ng new
  2. Choose Sass as the stylesheet format
  3. ng build or ng serve

🔥 Exception or Error

ERROR in multi ./src/styles.sass
Module not found: Error: Can't resolve '[...]/src/styles.sass' in '[...]'

[...] above refers to the project folder.

@alan-agius4 alan-agius4 added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity5: regression area: schematics/angular labels Jan 31, 2019
@ngbot ngbot bot added this to the Backlog milestone Jan 31, 2019
@alan-agius4 alan-agius4 added freq2: medium and removed freq1: low Only reported by a handful of users who observe it rarely labels Jan 31, 2019
@webcourse-ng
Copy link

Thank you, wkurniawan07! I spent a good half a day wrestling this one... checked my setup environment in a million places after not finding anything on Google yesterday. Even started a thread on Stack Overflow: https://stackoverflow.com/questions/54463979/angular-7-cli-generated-project-throws-error-in-multi-src-styles-sass

@robvaneck
Copy link

robvaneck commented Feb 1, 2019

I have the same bug. Just updated my CLI to latest 7.3.0 and then created a new project... choose sass.. (which is scss)

but there is a typo in the cli source code (i guess)

The angular.json is invalid:

  "projects": {
    "angular-skeleton": {
      "schematics": {
        "@schematics/angular:component": {
          "style": "sass"
        }
      },
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "styles": [
              "src/styles.sass"
            ],

sass should be scss here

@DanJFletcher
Copy link

I have zero experience with the internals of Angular but could this bug be caused by line 129 in this file? https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/ng-new/schema.json

I'm wondering if value is supposed to be scss and not sass. I have no idea how the templates actually get generated so I could be way off. But without running the tool in a local dev environment it's my best guess.

@karamjeetiron
Copy link

I have number of files with extension .scss. Do i have to change the extension to scss to sass?

@alan-agius4
Copy link
Collaborator

@karamjeetiron, no you don't have too.

The extension should be scss and not sass. We stopped offering sass as file extension for new projects.

See #13444

@clydin
Copy link
Member

clydin commented Feb 8, 2019

This has been corrected in CLI 7.3.1 and all newly generated applications will contain the correct file extensions. Existing projects suffering from this issue will need to manually update the file extension in angular.json as noted above.

@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 9, 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.

7 participants