"Middleware "strapi::body": Cannot destructure property 'config' of 'strapi.plugin(...)' as it is undefined" when trying to start a new Strapi project

System Information
  • Strapi Version: 4.3.5
  • Operating System: MacOS 12
  • Database: SQLite / Postrgres
  • Node Version:
  • NPM Version: 8.11
  • Yarn Version:

I am trying to install a fresh Strapi app on my mac, by running the

npx create-strapi-app@latest my-project --quickstart

commnand. It installs the Strapi app fine, but when I try to run “npm run develop”, I get this error:

“Strapi: Middleware “strapi::body”: Cannot destructure property ‘config’ of ‘strapi.plugin(…)’ as it is undefined.”

And the app doesn’t start. full error text is as follows:

 Middleware "strapi::body": Cannot destructure property 'config' of 'strapi.plugin(...)' as it is undefined.
Error: Middleware "strapi::body": Cannot destructure property 'config' of 'strapi.plugin(...)' as it is undefined.
    at instantiateMiddleware (/Users/davit/Github/my-project/node_modules/@strapi/strapi/lib/services/server/middleware.js:12:11)
    at resolveMiddlewares (/Users/davit/Github/my-project/node_modules/@strapi/strapi/lib/services/server/middleware.js:56:18)
    at registerApplicationMiddlewares (/Users/davit/Github/my-project/node_modules/@strapi/strapi/lib/services/server/register-middlewares.js:66:29)
    at async Object.initMiddlewares (/Users/davit/Github/my-project/node_modules/@strapi/strapi/lib/services/server/index.js:99:7)
    at async Strapi.bootstrap (/Users/davit/Github/my-project/node_modules/@strapi/strapi/lib/Strapi.js:445:5)
    at async Strapi.load (/Users/davit/Github/my-project/node_modules/@strapi/strapi/lib/Strapi.js:457:5)
    at async Strapi.start (/Users/davit/Github/my-project/node_modules/@strapi/strapi/lib/Strapi.js:198:9) 

Would appreciate any help regarding this issue.

Welcome to the Strapi Community Forums @Lursmani :wave: :cake:
Please make sure you upgrade to 4.3.6 as it was a hotfix in it to fix 4.3.5

Yep, that fixed it. Thanks!

1 Like