Why sass not compiling in Nuxt project











up vote
0
down vote

favorite












I am trying to use Sass in my project based on Nuxt but no luck, I followed the documentation which tell to install few packages and it will complie. but I get the following error



error  in ./pages/index.vue?vue&type=style&index=0&lang=sass&

Module build failed (from ./node_modules/sass-loader/lib/loader.js):

body{
^
Invalid CSS after "body{": expected "}", was "{"


and my code is in index.vue



<style lang="sass">
body{
margin: 0;

links{
border-bottom: 2px solid red;
}
}
</style>









share|improve this question






















  • try lang="scss"
    – Badgy
    Nov 8 at 13:39















up vote
0
down vote

favorite












I am trying to use Sass in my project based on Nuxt but no luck, I followed the documentation which tell to install few packages and it will complie. but I get the following error



error  in ./pages/index.vue?vue&type=style&index=0&lang=sass&

Module build failed (from ./node_modules/sass-loader/lib/loader.js):

body{
^
Invalid CSS after "body{": expected "}", was "{"


and my code is in index.vue



<style lang="sass">
body{
margin: 0;

links{
border-bottom: 2px solid red;
}
}
</style>









share|improve this question






















  • try lang="scss"
    – Badgy
    Nov 8 at 13:39













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to use Sass in my project based on Nuxt but no luck, I followed the documentation which tell to install few packages and it will complie. but I get the following error



error  in ./pages/index.vue?vue&type=style&index=0&lang=sass&

Module build failed (from ./node_modules/sass-loader/lib/loader.js):

body{
^
Invalid CSS after "body{": expected "}", was "{"


and my code is in index.vue



<style lang="sass">
body{
margin: 0;

links{
border-bottom: 2px solid red;
}
}
</style>









share|improve this question













I am trying to use Sass in my project based on Nuxt but no luck, I followed the documentation which tell to install few packages and it will complie. but I get the following error



error  in ./pages/index.vue?vue&type=style&index=0&lang=sass&

Module build failed (from ./node_modules/sass-loader/lib/loader.js):

body{
^
Invalid CSS after "body{": expected "}", was "{"


and my code is in index.vue



<style lang="sass">
body{
margin: 0;

links{
border-bottom: 2px solid red;
}
}
</style>






nuxt.js






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 8 at 11:06









Nofel

4581729




4581729












  • try lang="scss"
    – Badgy
    Nov 8 at 13:39


















  • try lang="scss"
    – Badgy
    Nov 8 at 13:39
















try lang="scss"
– Badgy
Nov 8 at 13:39




try lang="scss"
– Badgy
Nov 8 at 13:39












1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










Here is some Info about Sass and Scss




There are two syntaxes available for Sass. The first, known as SCSS
(Sassy CSS) and used throughout this reference, is an extension of the
syntax of CSS. This means that every valid CSS stylesheet is a valid
SCSS file with the same meaning. This syntax is enhanced with the Sass
features described below. Files using this syntax have the .scss
extension.



The second and older syntax, known as the indented syntax (or
sometimes just “Sass”), provides a more concise way of writing CSS. It
uses indentation rather than brackets to indicate nesting of
selectors, and newlines rather than semicolons to separate properties.
Files using this syntax have the .sass extension.
http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax




What you wrote is no valid Sass. If you change your lang="scss" then it will work and you still have the benefits of Scss.



TL;DR: lang="scss"






share|improve this answer





















  • Thank you so much. I spend hours google and here i was using wrong lang type.
    – Nofel
    Nov 8 at 14:05










  • @Nofel ah happy to hear that it helped i had the same problem some weeks ago
    – Badgy
    Nov 8 at 14:27











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53206496%2fwhy-sass-not-compiling-in-nuxt-project%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










Here is some Info about Sass and Scss




There are two syntaxes available for Sass. The first, known as SCSS
(Sassy CSS) and used throughout this reference, is an extension of the
syntax of CSS. This means that every valid CSS stylesheet is a valid
SCSS file with the same meaning. This syntax is enhanced with the Sass
features described below. Files using this syntax have the .scss
extension.



The second and older syntax, known as the indented syntax (or
sometimes just “Sass”), provides a more concise way of writing CSS. It
uses indentation rather than brackets to indicate nesting of
selectors, and newlines rather than semicolons to separate properties.
Files using this syntax have the .sass extension.
http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax




What you wrote is no valid Sass. If you change your lang="scss" then it will work and you still have the benefits of Scss.



TL;DR: lang="scss"






share|improve this answer





















  • Thank you so much. I spend hours google and here i was using wrong lang type.
    – Nofel
    Nov 8 at 14:05










  • @Nofel ah happy to hear that it helped i had the same problem some weeks ago
    – Badgy
    Nov 8 at 14:27















up vote
1
down vote



accepted










Here is some Info about Sass and Scss




There are two syntaxes available for Sass. The first, known as SCSS
(Sassy CSS) and used throughout this reference, is an extension of the
syntax of CSS. This means that every valid CSS stylesheet is a valid
SCSS file with the same meaning. This syntax is enhanced with the Sass
features described below. Files using this syntax have the .scss
extension.



The second and older syntax, known as the indented syntax (or
sometimes just “Sass”), provides a more concise way of writing CSS. It
uses indentation rather than brackets to indicate nesting of
selectors, and newlines rather than semicolons to separate properties.
Files using this syntax have the .sass extension.
http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax




What you wrote is no valid Sass. If you change your lang="scss" then it will work and you still have the benefits of Scss.



TL;DR: lang="scss"






share|improve this answer





















  • Thank you so much. I spend hours google and here i was using wrong lang type.
    – Nofel
    Nov 8 at 14:05










  • @Nofel ah happy to hear that it helped i had the same problem some weeks ago
    – Badgy
    Nov 8 at 14:27













up vote
1
down vote



accepted







up vote
1
down vote



accepted






Here is some Info about Sass and Scss




There are two syntaxes available for Sass. The first, known as SCSS
(Sassy CSS) and used throughout this reference, is an extension of the
syntax of CSS. This means that every valid CSS stylesheet is a valid
SCSS file with the same meaning. This syntax is enhanced with the Sass
features described below. Files using this syntax have the .scss
extension.



The second and older syntax, known as the indented syntax (or
sometimes just “Sass”), provides a more concise way of writing CSS. It
uses indentation rather than brackets to indicate nesting of
selectors, and newlines rather than semicolons to separate properties.
Files using this syntax have the .sass extension.
http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax




What you wrote is no valid Sass. If you change your lang="scss" then it will work and you still have the benefits of Scss.



TL;DR: lang="scss"






share|improve this answer












Here is some Info about Sass and Scss




There are two syntaxes available for Sass. The first, known as SCSS
(Sassy CSS) and used throughout this reference, is an extension of the
syntax of CSS. This means that every valid CSS stylesheet is a valid
SCSS file with the same meaning. This syntax is enhanced with the Sass
features described below. Files using this syntax have the .scss
extension.



The second and older syntax, known as the indented syntax (or
sometimes just “Sass”), provides a more concise way of writing CSS. It
uses indentation rather than brackets to indicate nesting of
selectors, and newlines rather than semicolons to separate properties.
Files using this syntax have the .sass extension.
http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax




What you wrote is no valid Sass. If you change your lang="scss" then it will work and you still have the benefits of Scss.



TL;DR: lang="scss"







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 8 at 13:42









Badgy

865320




865320












  • Thank you so much. I spend hours google and here i was using wrong lang type.
    – Nofel
    Nov 8 at 14:05










  • @Nofel ah happy to hear that it helped i had the same problem some weeks ago
    – Badgy
    Nov 8 at 14:27


















  • Thank you so much. I spend hours google and here i was using wrong lang type.
    – Nofel
    Nov 8 at 14:05










  • @Nofel ah happy to hear that it helped i had the same problem some weeks ago
    – Badgy
    Nov 8 at 14:27
















Thank you so much. I spend hours google and here i was using wrong lang type.
– Nofel
Nov 8 at 14:05




Thank you so much. I spend hours google and here i was using wrong lang type.
– Nofel
Nov 8 at 14:05












@Nofel ah happy to hear that it helped i had the same problem some weeks ago
– Badgy
Nov 8 at 14:27




@Nofel ah happy to hear that it helped i had the same problem some weeks ago
– Badgy
Nov 8 at 14:27


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53206496%2fwhy-sass-not-compiling-in-nuxt-project%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Schultheiß

Verwaltungsgliederung Dänemarks

Liste der Kulturdenkmale in Wilsdruff