config.yml not found on build
theantidoak opened this issue · comments
Hi,
Alias for the name of my site: 'my-site'
I'm getting this error when trying to access my-site.netlify.app/admin. localhost:8080/admin works fine.
Page Error:
Error loading the CMS configuration
Config Errors:
Error: Failed to load config.yml (404)
Check your config.yml file.
Browser Dev Tools Console Error:
Failed to load resource: the server responded with a status of 404 ()
config.js:439 Uncaught (in promise) Error: Failed to load config.yml (404)
at F (config.js:439:11)
at async config.js:570:68
I haven't made any changes to the project, but I have followed the instructions (except step 1 about filling out robot.txt, sitemap.xml, and _redirects) according to the README.md:
- Navigate to your Netlify Admin Panel, click Add new site | Import an existing project
- Follow the instructions to connect your GitHub repository to Netlify. Most of the site settings should be done for you, thanks to
netlify.toml
- Once deployed, click on Identity in the top navigation, then click Enable Identity
- Invite yourself, and the client, to the site
- While in the Identity tab, click the "Settings and usage" button to open the settings options. Then, do the following:
- Find "Registration Preferences", click "Edit Settings" and set registration from Public to Invite Only
- Find "Enable Providers" and add a provider. We recommend Google, so the client can login with Google in 1 click.
- Find "Git Gateway" and enable it
Summary: No project changes have been made. localhost:8080/admin and my-site.netlify.app work.
my-site.netifly.app/admin does not work and gives the above error.
Thanks! I recently tried to set up a configuration with nunjucks. It worked, but poorly, so I'm loving going through your configuration.
Hello!
Apologies it's taken so long to come up with a fix. I reached out to the Decap team to see if they could fix the issue natively, but they've been (understandably) busy with other Decap things.
Fortunately, a kind member of our community, @clsscrchm, contributed a PR to patch things within the starter kits. You should be able to copy/paste the script in the latest commit, add it to the of your admin/index.html file, and have it work!
<script>
(function() {
if (!location.href.endsWith('/')) {
window.location = location.href + '/'
}
}());
</script>
Going to happily close this one, and thank everyone for raising and fixing the issue