Angular-cli: Error building sass files

Created on 24 Aug 2016  路  6Comments  路  Source: angular/angular-cli

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Mac OSx El Capitan
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:
    angular-cli: 1.0.0-beta.11-webpack.2
    node: 6.4.0
    os: darwin x64
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
    ng new app --style=sass
    modify app.component.sass and add (with new line)
    h1 {
    color: red
    }
  4. The log given by the failure. Normally this include a stack trace and some
    more information.
    ERROR in ./src/app/app.component.sass
    Module build failed:
    }
    ^
    Invalid CSS after "}": expected 1 selector or at-rule, was "{}"
    in /opt/drones/src/app/app.component.sass (line 2, column 2)
    @ ./src/app/app.component.ts 19:21-52
    @ ./src/app/index.ts
    @ ./src/main.ts
    @ multi main
  5. Mention any other details that might be useful.
    seems to work when sass is on a single line without return (h1 { color: red}))
    but when there is a new line then the build will fail
1 (urgent) bufix

Most helpful comment

We are using SASS incorrectly. SASS relies on indentation instead of {...}. See https://github.com/sass/sass/issues/216 & http://sass-lang.com/guide.

All 6 comments

Experiencing same issue on Windows 10.

We are using SASS incorrectly. SASS relies on indentation instead of {...}. See https://github.com/sass/sass/issues/216 & http://sass-lang.com/guide.

You want to use SCSS, another SASS-Style.

thanks!!! scss is working as expected.

Thanks for this!

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