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

Error building sass files

Open dphung20 opened this issue 10 years ago • 6 comments

  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

dphung20 avatar Aug 23 '16 22:08 dphung20

Experiencing same issue on Windows 10.

TimMurphy avatar Aug 24 '16 03:08 TimMurphy

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

TimMurphy avatar Aug 24 '16 04:08 TimMurphy

You want to use SCSS, another SASS-Style.

mxii avatar Aug 24 '16 04:08 mxii

thanks!!! scss is working as expected.

dphung20 avatar Aug 24 '16 04:08 dphung20

Thanks for this!

Reza88 avatar Mar 01 '17 22:03 Reza88

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.