Config Errors: config must have required property 'media_folder'

I’m getting these errors when I try to go to http://localhost:3000/admin/index.html to view netlify CMS locally:

**Config Errors:**

config must have required property 'media_folder' 
config must have required property 'media_library' 
config must match a schema in anyOf

Check your config.yml file.

I’m super confused because I have both of those properties, and most of the other answers for this issue were to check indentation, which I think should be all right. I used a YAML validator too. This is my config.yml file:

backend:
  name: git-gateway
  branch: main # Branch to update (optional; defaults to master)

media_folder: "public"
media_library:
   name: uploads
publish_mode: editorial_workflow

collections:
  - name: "blog" # Used in routes, e.g., /admin/collections/blog
    label: "Blog" # Used in the UI
    folder: "blogPosts" # The path to the folder where the raw posts are stored
    create: true # Allow users to create new documents in this collection
    slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
    fields: # The fields for each document, usually in front matter
      - {label: "Page Title", name: "page_title", widget: "string"}
      - {label: "Meta Description", name: "meta_description", widget: "text"}
      - {label: "Article Title", name: "title", widget: "string"}
      - {label: "Publish Date", name: "date", widget: "datetime"}
      - {label: "Featured Image", name: "thumbnail", widget: "image"}
      - {label: "Body", name: "body", widget: "markdown"}

Can you share your repository?

1 Like

hey, thanks for the reply. It’s private unfortunately, but here’s how it looks


My admin folder is under the public directory (I’m using NextJS) and contains index.html and config.yml

This is my index.html file

<!doctype html>
<html>
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Content Manager</title>
  <script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
</head>
<body>
  <!-- Include the script that builds the page and powers Netlify CMS -->
  <script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
</body>
</html>

and this is my package.json

{
  "name": "dualete",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint",
    "export": "yarn run build && next export"
  },
  "dependencies": {
    "@chakra-ui/icons": "^1.0.15",
    "@chakra-ui/react": "^1.8.3",
    "@emotion/react": "^11",
    "@emotion/styled": "^11",
    "@next-auth/mongodb-adapter": "^1.0.1",
    "antd": "^4.16.13",
    "framer-motion": "^6",
    "mailgun-js": "^0.22.0",
    "mongodb": "^4.2.2",
    "multiselect-react-dropdown": "^2.0.5",
    "next": "^12.1.0",
    "next-auth": "^4.2.1",
    "react": "17.0.2",
    "react-dates": "^21.8.0",
    "react-dom": "17.0.2",
    "react-icons": "^4.3.1",
    "swr": "^1.0.1",
    "validator": "^13.7.0"
  },
  "devDependencies": {
    "eslint": "7.30.0",
    "eslint-config-next": "11.0.1",
    "webpack": "^5.61.0"
  }
}

any thoughts/ideas? Not sure what it could be

Hi there! Thanks for your interest in Netlify CMS. Looks like you posted your question a little while ago, but that you haven’t received a solution yet. Here’s where you might get more help:

netlifycms.org - the site houses our extensive documentation that likely contains helpful information to get you back on track.

netlify cms slack - join our friendly slack channel and chat with other cms pros to get the help you need.

GitHub Issues - think you’ve found a bug, or would like to make a feature request? Make your voice heard here. Netlify CMS is open source - PRs and other contributions are also welcome!

Stack Overflow Check StackOverflow for questions tagged “Netlify CMS” if you don’t get an answer in the Slack or the GH issues. StackOverflow reaches a worldwide audience of knowledgeable people.

Your question will be left open here for anyone to comment - but we encourage you to check out the above resources if you are still looking for a solution!