sparrowhuang
sparrowhuang
Node.js version: node:16.17.0 Yarn version: 1.22.19 Strapi version: V4.3.6 Database: pgsql Hi,I find this issue still exists.It shows "Cannot read property 'lifecycles' of undefined error" after i flowing the documentation.When...
Dear Shaun Brown, ``` console.log("strapi.db",strapi.db)//undefined strapi.db.lifecycles.subscribe({ models: [], // optional; beforeCreate(event) { const { data, where, select, populate } = event.params; }, afterCreate(event) { const { result, params } =...
But this way is still wrong. ``` // ./src/api/[api-name]/content-types/[api-name]/lifecycles.js // registering a subscriber strapi.db.lifecycles.subscribe({ models: [], // optional; beforeCreate(event) { const { data, where, select, populate } = event.params; event.state...