简体   繁体   English

如何修复,settings.json 文件中的文件预期错误?

[英]How to fix ,End of file expected error in settings.json file?

So I installed the Live sass compiler extension but it was not working.所以我安装了 Live sass 编译器扩展,但它不起作用。 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.所以我去了它的 MD 文件,在我的 settings.json 文件中复制了它的设置。 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.所以请原谅我的天真。

A JSON file must start with array( [ ) or object( { ). JSON 文件必须以数组 ( [ ) 或对象 ( { ) 开头。 Maybe you should have pasted it inside your file somewhere.也许你应该把它粘贴到你的文件中的某个地方。

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

在此处输入图像描述 在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM