Error Loading CMS Configuration

Hi I would like to know why im getting this behavior only on production?

I have this on open source https://github.com/goldcoders/cms

I remove my config.yml file and instead put it all to collection/index.js and build together with netlify cms from source.

I tried using this on local i have no problem.

but then for production site at netlify i keep getting 404 not found
but if you check the link for main.js it is loaded via https on /admin/main.js
it is properly reference on the static/admin/index.html

this is my main.ts file
it is being compile to /static/admin/main.js

// main.ts

window.CMS_MANUAL_INIT = true

import { init } from 'netlify-cms';
import collections from './collections/index';
import './shortcodes';
import './events';

import type {Config} from './Structs/config';


let config: Config = {
    backend: {
        name: "git-gateway",
        branch: "netlify-cms"
    },
    load_config_file: false,
    media_folder: "exampleSite/static/images",
    public_folder: "/images",
    logo_url: "/images/logo.svg",
    show_preview_links: false,
    collections
}

init({config});

This is the console logs at my browser when i load /admin

netlify-cms-app 2.12.25
main.js:339 netlify-cms-core 2.31.0
main.js:2256 netlify-cms 2.10.61
main.js:339 netlify-cms-core 2.31.0
main.js:161 GET https://example-site.netlify.app/admin/config.yml 404
at /admin/async https:/example-site.netlify.app/admin/main.js:161

I dont know if the config load_config_file: false,

Any help would be appreciated thanks

This Happens everytime netlify rebuilds my site with git hooks from github

but if i deploy using netlify-cli with the following commands
netlify build --context=prod
then netlify deploy --prod

I dont see this error, but then again there is some weird issue like the display url / site_url is on localhost:3000 being shown on the navbar…

Im using latest netlify-cms version 2.10.61
also using latest netlify-cli 2.65 on nodev14.7.0

Can you check if moving the manual init flag from main.ts to index.html helps?

<script>window.CMS_MANUAL_INIT = true;</script>

I have 2 account this is my personal codeitlikemiley, other one is from my company,
goldcoders
Yup ive posted already the solution on github
which i guess you have read and posted it back here :slight_smile: