elierotenberg / directus-typescript-gen

98 stars 12 forks source link

Type generation fails with relational data #1

Open Jonesus opened 3 years ago

Jonesus commented 3 years ago

When having a Directus schema configured with nested M2A interfaces and translations the generation fails with the following error:

AggregateError
    at /home/jones/.npm/_npx/3ab71cb4b039ec8b/node_modules/typed-utilities/build/iterAsync.js:97:27
    at step (/home/jones/.npm/_npx/3ab71cb4b039ec8b/node_modules/typed-utilities/build/iterAsync.js:33:23)
    at Object.next (/home/jones/.npm/_npx/3ab71cb4b039ec8b/node_modules/typed-utilities/build/iterAsync.js:14:53)
    at fulfilled (/home/jones/.npm/_npx/3ab71cb4b039ec8b/node_modules/typed-utilities/build/iterAsync.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Is there a known pitfall somewhere? I'll try to come up with a minimal reproduction tomorrow!

Phreeshad commented 6 months ago

@Jonesus Maybe unrelated, but do you have collections with similar names to Directus collections? E.g. sessions similar to directus_sessions.