Node-Sass Invalid CSS

Node-SASS Compiler fails - Invalid CSS

SCSS files use the .scss extension, not .sass. The two formats have a different syntax.

Read about the differences here: https://responsivedesign.is/articles/difference-between-sass-and-scss

Sass Invalid CSS Error: expected expression

Based on your error message (error sass/test.sass) I can tell you're using the .sass extension for a Scss file. Change your file name to style.scss.

Sass and Scss use two different and incompatible syntaxes.

node-sass invalid CSS

The syntax is incorrect for node-sass.

You have defined the font variable correctly in fonts.scss but you need to import the font file into your Nav.scss file if you haven't already with:

@import "PATH/fonts.scss";

You then just need to reference the variable like so:

font-family: $roboto;

SassError: Invalid CSS expected expression (e.g. 1px, bold)

Node-sass causes this problem to me too. I fixed it using sass instead of node-sass.

Just run npm install sass and should work.

Sass invalid css error on compile in live sass compiler

It looks like you're using the .sass file extension for index.sass for a scss file. You need to change it to use the scss file extension for it to compile.

See also:

Sass Invalid CSS Error: "expected expression"

Why is node-sass throwing Invalid CSS after \ @include corners\: expected \}\, was \.rounded;\

Node-sass, which is libsas based, doesn't currently support the @use syntax, only dart-sass does https://sass-lang.com/documentation/at-rules/use



Related Topics



Leave a reply



Submit