Netlify CMS error when trying to edit entry... TypeError: e.map is not a function

Bug
Unable to get into entries on the CMS to update my pages due to an error page being presented. “TypeError: e.map is not a function”. There are no errors in my command line. No build failures. CMS package is up to date.

To reproduce
I log in to Netlify CMS, navigate to pages, click on index and then am presented with the attached screenshot.

What I expect
I would expect to log in, navigate to pages, select the index page and be presented with editable boxes.

Screenshot

Applicable Versions:

  • Netlify CMS version: netlify-cms@2.10.150
  • Git provider: git-gateway
  • Browser version: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36

CMS configuration

backend:
  name: git-gateway
  branch: master
site_url: https://secure24.co.uk
publish_mode: editorial_workflow
media_folder: _site/images/uploads
public_folder: src/images/uploads
collections:
  - name: pages
    label: Pages
    files:
      - name: index
        label: Index
        folder: src/site/_data/
        file: src/site/_data/index.json
        fields:
          - label: Title
            name: title
            widget: string
          - label: Subtitle
            name: subtitle
            widget: string
            required: false
          - label: Intro
            name: intro
            widget: markdown
          - label: Secondary content
            name: secondaryContent
            widget: list
            required: false
            fields:
              - label: Title
                name: title
                widget: string
              - name: content
                label: Content
                widget: list
                fields:
                  - label: Paragraph
                    name: paragraph
                    widget: markdown
                    required: false
                  - name: bullets
                    label: bullets
                    widget: list
                    required: false
                    fields:
                      - label: BulletPoint
                        name: bulletpoint
                        widget: string
                        required: false
          - name: pricing
            label: Pricing
            widget: list
            fields:
              - label: Package
                name: package
                widget: string
              - name: features
                label: Features
                widget: list
                fields:
                  - label: Feature
                    name: feature
                    widget: string
              - name: pricing
                label: Pricing
                widget: list
                fields:
                  - label: Price
                    name: price
                    widget: string
      - name: about
        label: About
        folder: src/site/_data/
        file: src/site/_data/about.json
        fields:
          - name: about
            label: about
            widget: list
            fields:
              - label: Title
                name: name
                widget: string
              - label: Subtitle
                name: subtitle
                widget: string
              - name: about
                label: About
                widget: list
                fields:
                  - label: Paragraph
                    name: paragraph
                    widget: markdown
                  - label: Image
                    name: image
                    widget: image
                    required: false
      - name: caseStudies
        label: Case Studies
        folder: src/site/_data/
        file: src/site/_data/caseStudies.json
        fields:
          - name: studies
            label: Studies
            widget: list
            fields:
              - label: Name
                name: name
                widget: string
              - label: Subtitle
                name: subtitle
                widget: string
              - name: about
                label: About
                widget: list
                fields:
                  - label: Paragraph
                    name: paragraph
                    widget: markdown
                  - label: Author
                    name: Author
                    widget: string
                    required: false
              - label
...

Can you share your repository?

There are multiple errors in your config. You cannot set both a file and a folder property for a file collection.

folder: src/site/_data/
file: src/site/_data/index.json

I have amended this and still no change

Maybe there’s a mismatch between the config and the actual data. You could try to remove collections and add them back one by one to narrow down the problem, as you have a bit too much data to troubleshoot. Since it’s a map function that throws an error, it’s likely that a list is causing this.