Content-type inside a plugin with localized true throw err

Hey When creating a content-type inside a plugin and then set

"pluginOptions": {
   "i18n": {
      "localized": true
   }
},

Strapi won’t build anymore throwing an err:

[2022-07-30 00:47:31.133] debug: ⛔️ Server wasn't able to start properly.
[2022-07-30 00:47:31.134] error: Cannot read properties of undefined (reading 'routes')
TypeError: Cannot read properties of undefined (reading 'routes')
    at Object.addCreateLocalizationAction (/Users/manuelschoebel/Workspace/digitale-kumpel/digitale-kumpel.ruhr/node_modules/@strapi/plugin-i18n/server/services/core-api.js:182:23)
    at /Users/manuelschoebel/Workspace/digitale-kumpel/digitale-kumpel.ruhr/node_modules/@strapi/plugin-i18n/server/register.js:78:22
    at Array.forEach (<anonymous>)
    at extendLocalizedContentTypes (/Users/manuelschoebel/Workspace/digitale-kumpel/digitale-kumpel.ruhr/node_modules/@strapi/plugin-i18n/server/register.js:56:38)
...

There seem to be similar issues for quiet some time. Any hints on how to resolve it? E.g. https://github.com/strapi/strapi/issues/10120 Implement I18n localization in Strapi local plugins - Stack Overflow

1 Like

See Is it possible to add i18n locale options in a custom plugin content-types?