0

So I installed the Live sass compiler extension but it was not working. I went to its settings and nothing was there. So I went to its MD file on copied its settings in my settings.json file. But after that, I am getting this error -

This is the code -

    "liveSassCompile.settings.formats":[
 
    {
        "format": "expanded",
        "extensionName": ".css",
        "savePath": null
    },

    {
        "format": "compressed",
        "extensionName": ".min.css",
        "savePath": "/dist/css"
    },

    {
        "format": "compressed",
        "extensionName": ".min.css",
        "savePath": "~/../css/"
    }
]

and this is the error -

End of file expected. jsonc [1, 35]

Also, I am new to stack overflow! So pardon my Naivety.

Raghav
  • 13
  • 1
  • 5

1 Answers1

1

A JSON file must start with array([) or object({). Maybe you should have pasted it inside your file somewhere.

{
  "settings": {
    // maybe somewhere like here
  }
}

enter image description here enter image description here

Jello
  • 334
  • 2
  • 10
  • But why do I have to paste anything at all? Shouldn't the live sass compiler extension already have these settings in place? It seems like the extension is empty or do I have errors in my defaultsettings.json file? – Raghav Jan 11 '22 at 14:44
  • There is not enough information in your question about what you installed and what you did. My answer is just about the error msg. – Jello Jan 11 '22 at 14:47
  • Ya thank you, I did it your way and now the error is gone now. But the problem is the live sass compiler extension is not generating the output file anywhere !! I thought this error was the reason but now that it is solved. I don't know why it's not working? Edit : Also, I can't upvote your answer need 15 rep points for that. – Raghav Jan 11 '22 at 14:55
  • Which document are you looking at? – Jello Jan 11 '22 at 14:59
  • https://github.com/ritwickdey/vscode-live-sass-compiler/blob/master/docs/settings.md – Raghav Jan 11 '22 at 15:01
  • Did you press `Watch Sass` button at the bottom to compile it? – Jello Jan 11 '22 at 15:02
  • yes of course, I have also tried reinstalling the vs code but nothing seems to work. And I just open the defaultsettings.json file and it is showing me 6 similar errors. How can I post the screenshot here ? – Raghav Jan 11 '22 at 15:04
  • Editing your question will be better – Jello Jan 11 '22 at 15:07
  • I posted in the answer – Raghav Jan 11 '22 at 15:11
  • Those are warnings, and you should show the warning lines at least.. – Jello Jan 11 '22 at 15:18
  • But I am not allowed to embed images in my questions! – Raghav Jan 11 '22 at 15:20
  • "terminal.integrated.defaultProfile.windows": null, warning - Value is not accepted. Valid values: "PowerShell", "Command Prompt", "JavaScript Debug Terminal". – Raghav Jan 11 '22 at 15:33