I'm in the process of converting my strapi project to typescript. I've updated all strapi packages to version 4.15.5
and converted the files to ts extension. However, upon running strapi develop
, I encounter the following error:
[2024-01-03 10:50:48.102] debug: ⛔️ Server failed to start properly.
[2024-01-03 10:50:48.103] error: Cannot use 'in' operator to search for 'Symbol(StrapiCustomCoreController)' in undefined
TypeError: Cannot use 'in' operator to search for 'Symbol(StrapiCustomCoreController)' in undefined
at isCustomController (/home/dev/gn/strapi-cms/node_modules/@strapi/strapi/dist/factories.js:80:35)
at Array.filter (<anonymous>)
at Strapi.sendStartupTelemetry (/home/dev/gn/strapi-cms/node_modules/@strapi/strapi/dist/Strapi.js:243:68)
at Strapi.postListen (/home/dev/gn/strapi-cms/node_modules/@strapi/strapi/dist/Strapi.js:266:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Server.onListen (/home/dev/gn/strapi-cms/node_modules/@strapi/strapi/dist/Strapi.js:276:11)
The issue is occurring within the controller factories module of strapi located at
node_modules/@strapi/strapi/dist/factories.js
specifically in this method:
const isCustomController = (controller) => {
return symbols.CustomController in controller; // why is controller undefined!?
};
I need some guidance on how to resolve this problem. Any help would be greatly appreciated.