YAMLSyntaxError: Failed to resolve SEQ_ITEM node here at line X, column Y:

YAMLSyntaxError: Failed to resolve SEQ_ITEM node here at line X, column Y:

我在尝试 运行 Netlify CMS

时遇到此错误
Error loading the CMS configuration
Config Errors:

YAMLSyntaxError: Failed to resolve SEQ_ITEM node here at line 10, column 1:

    - name: Posts
^^^^^^^^^^^^^^…

Check your config.yml file.

我检查了语法并尝试了不同的语法,但我仍然在 config.yml 文档的某处遇到相同的错误。

这是麻烦的config.yml文档:

backend:
  name: git-gateway
  branch: master

media_folder: src/assets/images
media_library:
    name: uploads

collections:
    - name: Posts
      label: Posts
      create: true
      folder: "/articles"
      slug: articles/{{slug}}
      fields:
        - {label: Title, name: title, widget: string}
        - {label: Publish Date, name: date, widget: datetime}
        - {label: Featured Image, name: cover_image, widget: image}
        - {label: Body, name: body, widget: markdown}

这是我从 https://drive.google.com/file/d/1OJPKJRgCljxAG5UuUxXkBPPNoUcyJe48/view?usp=sharing

中得到错误的文件的 link

您链接的文件使用制表符进行缩进。 YAML 使用空格,参见 the spec:

In general, indentation is defined as a zero or more space characters at the start of a line.

To maintain portability, tab characters must not be used in indentation, since different systems treat tabs differently.

您需要将制表符转换为空格。