Closed otbe closed 2 months ago
Hmmm interesting one, I'm going to create a big catalog locally for this.
Is it possible you could setup a fork of this big one at all? Saves me time building something massive, maybe ofc remove any PII information or sensitive info? Is that possible, or not? Let me know and I will have a look
I think this is not possible. Besides the events/services it also contains a lot of business process descriptions :)
I made some changes to be able to build it at least once locally see https://github.com/otbe/eventcatalog/tree/fix-ts-issues
However it turns out Im not able to finish the build. Node goes OOM even with NODE_OPTIONS=--max-old-space-size=25000
(in v1 --max-old-space-size=8192
was enough)
Ok little update. With 2.0.10
I get the following errors during build.
14:30:43 [check] Getting diagnostics for Astro files in .../eventcatalog/.eventcatalog-core...
src/components/DocsNavigation.astro:60:14 - error ts(7053): Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{ events: any; commands: any; domains: any; services: any; teams: any; users: any; }'.
60 visible: visibleCollections[item.collection],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/components/DocsNavigation.astro:19:17 - error ts(2590): Expression produces a union type that is too complex to represent.
19 const allData = [ ...domains, ...services, ...messages, ...teams, ...users];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/layouts/VisualiserLayout.astro:13:18 - error ts(2590): Expression produces a union type that is too complex to represent.
13 const navItems = [...domains, ...services, ...events, ...commands];
I tried to copy the the package.json/package-lock.json from a fresh new catalog generated by npx @eventcatalog/create-eventcatalog@latest my-catalog
and it still fails. However I cannot reproduce it in the example catalog as long as I dont copy over my events/domains/services. With the changes in https://github.com/event-catalog/eventcatalog/compare/main...otbe:eventcatalog:fix-ts-issues Im able to build the catalog, or at least get over the type checking point. Still no luck with 25GB ram building the catalog. Im going to create a dedicated ticket for this.
Finding from today. The error starts to popup as soon as I add services. ~950 events and 30 domains are no issues. When I add the services (without any links to each other) it starts to fail with the errors from above.
I opened a merge request. No idea why there are so many unrelated changes after formatting via "format" script but the real changes are
Without these 3 lines I cannot build the big catalog. Might be some TS voodoo.
Summary
When trying to build the catalog via
eventcatalog build
it fails with the following TS error:We work with 30 domains, 25 services and ~950 events. dev mode wokrs fine.