Error Error: component is not defined on the model

System Information
  • Strapi Version: v3.6.8
  • Operating System: linux
  • Database: postgres
  • Node Version: 16.14.0
  • NPM Version: 8.3.1
  • Yarn Version: N/A

I’ve submitted a bug report here: error Error: component is not defined on the model. · Issue #13064 · strapi/strapi · GitHub

I was wondering if there was some kind of workaround. Strapi with mongodb doesn’t have this issue though. We want to move to postgres but are currently hitting wall after wall. Help would be appreciated.

Gui error: Invalid input data. Please verify unique constraints.
CLI error:

error Error: component is not defined on the model.
    at EagerRelation.<anonymous> (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/base/eager.js:50:15)
From previous event:
    at /home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:96:73
From previous event:
    at EagerRelation._eagerLoadHelper (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:83:23)
    at Sync.<anonymous> (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:31:31)
    at processImmediate (node:internal/timers:466:21)
From previous event:
    at EagerRelation.eagerFetch (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:31:8)
    at EagerRelation.<anonymous> (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/base/eager.js:67:14)
From previous event:
    at /home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:96:73
From previous event:
    at EagerRelation._eagerLoadHelper (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:83:23)
    at Sync.<anonymous> (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:71:25)
    at processImmediate (node:internal/timers:466:21)
From previous event:
    at /home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:65:12
    at /home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/lodash/lodash.js:3585:27
    at /home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/lodash/lodash.js:4967:15
    at baseForOwn (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/lodash/lodash.js:3032:24)
    at /home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/lodash/lodash.js:4936:18
    at baseMap (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/lodash/lodash.js:3584:7)
    at Function.map (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/lodash/lodash.js:9622:14)
    at EagerRelation.morphToFetch (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:56:9)
    at EagerRelation.eagerFetch (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:25:19)
    at EagerRelation.<anonymous> (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/base/eager.js:67:14)
From previous event:
    at /home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:96:73
From previous event:
    at EagerRelation._eagerLoadHelper (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:83:23)
    at Sync.<anonymous> (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:31:31)
From previous event:
    at EagerRelation.eagerFetch (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/eager.js:31:8)
    at EagerRelation.<anonymous> (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/base/eager.js:67:14)
From previous event:
    at Child._handleEager (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/model.js:1526:56)
    at Child.<anonymous> (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/model.js:732:27)
    at processImmediate (node:internal/timers:466:21)
From previous event:
    at Child.<anonymous> (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/model.js:730:12)
From previous event:
    at Child.fetch (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/bookshelf/lib/model.js:702:19)
    at Function.findOne (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/strapi-connector-bookshelf/lib/relations.js:65:8)
    at Function.update [as updateRelations] (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/strapi-connector-bookshelf/lib/relations.js:100:51)
    at runCreate (/home/dogunbound/work/DigitalHumanities/pgSyriosStrapi/node_modules/strapi-connector-bookshelf/lib/queries.js:117:20)