question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read properties of undefined (reading 'path')

See original GitHub issue

Describe the bug

To Reproduce

Expected behavior

Screenshots

Applicable Versions:

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

CMS configuration

backend:
  name: github
  repo: ux-at-icfnext/practice-netlify-cms
  "netlify.configure({'site_id'": gifted-boyd-d36ba9.netlify.com});
media_folder: assets/img/uploads
collections:
  - label: Posts
    name: posts
    folder: _posts
    create: true
    slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
    fields:
      - label: Layout
        name: layout
        widget: hidden
        default: default
      - label: Title
        name: title
        widget: string
      - label: Description
        name: desc
        widget: string
      - label: Body
        name: body
        widget: markdown
    publish: true
    type: folder_based_collection
    sortable_fields:
      - commit_date
      - title
      - commit_author
    view_filters: []
    view_groups: []
publish_mode: simple
slug:
  encoding: unicode
  clean_accents: false
  sanitize_replacement: "-"
public_folder: /assets/img/uploads
isFetching: false
error: null

Additional context

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
bytranglecommented, Sep 27, 2021

@gangsthub : The issue will always get resolved if you specify the branch name in the config. Actually, it only manifests when you don’t configure branch name, which I think is the case with many newly-initiated project with Netlify CMS.

What happens under the hood is that Netlify CMS will assume that your default branch is master, which is no longer the case with all the major Git host. Then, when it tried to push content to master branch, it will get hit with an 404 (IIRC) error because master doesn’t exist in many repos.

So, that’s the gist of the problem 😓.

1reaction
bytranglecommented, Sep 28, 2021

@gangsthub Many of us got tripped by that when first setting up Netlify CMS 😃.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read properties of undefined (reading 'path')
I'm attempting to generate NFTs using this code but keep getting cannot read properties of undefined reading path, if anyone knows of a...
Read more >
TypeError: Cannot read properties of undefined (reading 'path ...
Attempting to generate any amount of images, "node index.js" is sent into terming. A few images get made with a DNA and then...
Read more >
Uncaught typeerror: cannot read properties of ... - CodeProject
Usually this means a variable that you're referencing has a value of undefined when you try to read the property (as the error...
Read more >
cannot read properties of undefined (reading 'paths') - You.com
Here's an example of a JavaScript TypeError: Cannot read property of undefined thrown when a property is attempted to be read on an...
Read more >
Cannot read property 'path' of undefined - Cloudinary Support
Cannot read property 'path' of undefined. Follow. Avatar. Roman Armin Rostock. 3 months ago. I'm getting this error even though multer logged the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found