Hello, I just changed from the dashboard a relation, the server reloading and crashed. I tested to reload manually, and I’ve got this error :
This topic has been created from a Discord post (1229442154041053285) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord
1 Like
Legend :
n is one collection
k is one collection
ks is the k collection but plurial.
Error on attribute * in model * after a edition of a collection
✔ Creating admin (11225.103291988373ms)
Error: inversedBy attribute ks not found target api::a.a
at createJoinTable (/home/strapi/node_modules/@strapi/database/dist/index.js:2218:13)
at createManyToOne (/home/strapi/node_modules/@strapi/database/dist/index.js:1934:5)
at createRelation (/home/strapi/node_modules/@strapi/database/dist/index.js:2249:14)
at createMetadata (/home/strapi/node_modules/@strapi/database/dist/index.js:2327:11)
at new Database (/home/strapi/node_modules/@strapi/database/dist/index.js:6105:21)
at Database.init (/home/strapi/node_modules/@strapi/database/dist/index.js:6100:16)
at Strapi.bootstrap (/home/strapi/node_modules/@strapi/strapi/dist/Strapi.js:365:39)
at Strapi.load (/home/strapi/node_modules/@strapi/strapi/dist/Strapi.js:419:16)
at async Object.develop (/home/strapi/node_modules/@strapi/admin/dist/_chunks/index-cce8ecb6.js:1160:28)
at async develop (/home/strapi/node_modules/@strapi/admin/dist/_chunks/develop-69e28e61.js:52:5)
[ERROR] There seems to be an unexpected error, try again with --debug for more information
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ │
│ Error: Error on attribute n in model k(api::k.k): inversedBy attribute anot found target api::a.a │
│ at createMetadata (/home/strapi/node_modules/@strapi/database/dist/index.js:2334:17) │
│ at new Database (/home/strapi/node_modules/@strapi/database/dist/index.js:6105:21) │
│ at Database.init (/home/strapi/node_modules/@strapi/database/dist/index.js:6100:16) │
│ at Strapi.bootstrap (/home/strapi/node_modules/@strapi/strapi/dist/Strapi.js:365:39) │
│ at Strapi.load (/home/strapi/node_modules/@strapi/strapi/dist/Strapi.js:419:16) │
│ at async Object.develop (/home/strapi/node_modules/@strapi/admin/dist/_chunks/index-cce8ecb6.js:1160:28) │
│ at async develop (/home/strapi/node_modules/@strapi/admin/dist/_chunks/develop-69e28e61.js:52:5) │
│ at async Command.parseAsync (/home/strapi/node_modules/commander/lib/command.js:923:5) │
│ at async Module.runStrapiCommand (/home/strapi/node_modules/@strapi/strapi/dist/commands/index.js:124:3) │
│ │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Done in 14.97s.
Update :
I fixed my problem to removing some lines at src/api/the-collection/content-types/collection/schema.json
.
_Note : This question come from <@93801185122713600> at https://forum.strapi.io/u/thomasbnt_