Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better debugging #122

Open
edurenye opened this issue Dec 10, 2024 · 2 comments
Open

Better debugging #122

edurenye opened this issue Dec 10, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@edurenye
Copy link

Is your feature request related to a problem? Please describe.
I'm getting an error during a schema push, and I want more information regarding the error, but when I use the debug option all I get is this:

[09:31:42.351] DEBUG (1482): [migration-client] Cache cleared
[09:31:42.363] INFO (1482): ---- Push schema ----
[09:31:43.005] ERROR (1482):
    errors: [
      {
        "message": "Cannot read properties of undefined (reading 'fields')",
        "extensions": {
          "code": "INTERNAL_SERVER_ERROR",
          "stack": "TypeError: Cannot read properties of undefined (reading 'fields')\n    at FieldsService.createField (file:///app/directus/node_modules/@directus/api/dist/services/fields.js:262:79)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async file:///app/directus/node_modules/@directus/api/dist/utils/apply-diff.js:158:21"
        }
      }
    ]
    response: {}

Describe the solution you'd like
I would like it to tell me which file triggered that error so it is easier for me to debug it and find the problem.

@EdouardDem EdouardDem added the enhancement New feature or request label Jan 16, 2025
@spashii
Copy link

spashii commented Jan 28, 2025

I was facing a similar issue. I was running some custom migrations for pgvector columns before pushing the directus-sync schema. Once I got rid of those and did them after directus-sync push, the issue went away.

In my case, I suspect that it was due to directus not recognizing pgvector columns.

@ussaama
Copy link

ussaama commented Jan 28, 2025

Your database may include one or more collections with columns that are incompatible with the Directus version you're trying to push the schema to.

Resolution:

  • Ensure that all required collections and their columns exist and are compatible with the targeted Directus version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants