I am getting the error below while trying to login into DirectUS. We are using Postgres SQL as a database.
at runMicrotasks (<anonymous>)
at AuthenticationService.login (/src/node_modules/directus/dist/services/authentication.js:166:40)
at ActivityService.createOne (/src/node_modules/directus/dist/services/activity.js:97:22)
at ActivityService.createOne (/src/node_modules/directus/dist/services/items.js:50:74)
TypeError: Cannot read properties of undefined (reading 'primary')
"stack":
"message": "Cannot read properties of undefined (reading 'primary')",
"type": "TypeError",
I gave all the PRIVILEGES to the directus account in the database
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO directus_account;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO directus_account;
I am not a type script developer however I believe that the following line causes the issue
https://github.com/directus/directus/blob/main/api/src/services/items.ts#L194