Error running strapi start command: ‘Bootstrap function in admin failed’

System Information
  • Strapi Version: 3.6.7
  • Operating System:
  • Database: Postgres 9
  • Node Version: 14.17.0
  • NPM Version: 6.14.13
  • Yarn Version:

Getting the following error when trying to run strapi start on our servers. This happened after we upgraded from 3.6.5 to 3.6.7 and added content types. Locally strapi start works without issues. Am unsure what exactly the error message is referring to and what could be the cause.

[2021-08-25T19:04:56.015Z] error bootstrap function in admin failed
[2021-08-25T19:04:56.052Z] error TypeError: Cannot read property ‘attributes’ of undefined
at Object.getNonVisibleAttributes (/app/packages/cms/node_modules/strapi-utils/lib/content-types.js:76:11)

I had made a custom component under the category name icon. The Strapi .gitignore file has a default entry for Icon under OS X but it is ignoring my component inside the components/icon directly. I think there should be a change to not target directories named icon in other directories in the gitignore file, or at least have a restriction to not allow you to create a component with the category name icon. I had a content type depending on this component.

This explains why it was working locally but not on the server, because the file never got committed when the components were created and pushed.

My solution was to move the component into another directory not named icon and it fixed the issue.