event-catalog / generator-asyncapi

AsyncAPI generator for EventCatalog
https://www.eventcatalog.dev/docs/development/integrations/async-api/intro
Other
9 stars 4 forks source link

No such file or directory when calling npm run generate #60

Closed acezar closed 1 month ago

acezar commented 2 months ago

I tried this:

I have cloned the eventcatalog-asyncapi-example , did a npm install and a npm run generate on the working example without changing any file. Processing the domain and message was successful, but when it comes to processing the service it throws an ENOENT Error. Same issue occurs also for the "eventcatalog-openapi-example". Node version is 20.17.0.

This happened:

Processing domain: Orders (v0.0.1)

I expected this:

No response

Is there a workaround?

No response

Anything else?

No response

EventCatalog Version

No response

Node.js Version

20.17.0

Platform(s)

No response

Community Notes

smalls257 commented 1 month ago

I've been playing around locally trying to get around it. Looks like a path issue. Index.ts L245 and a couple other places pop the directory based on a '/' to get the filename. This doesn't work for windows, replacing with "\" works for me locally. Probably need something more robust for Linux+ Windows. I'm not savvy with front-end apps else I'd get a PR out there.

boyney123 commented 1 month ago

Thanks for raising the issue. @eventcatalog/generator-asyncapi@2.1.0 is now out. Let me know if you still have any issues.

acezar commented 1 month ago

Thanks for the quick fix, I've updated the package.json of the asyncapi-example repo with the newest version of the generator and it works!

boyney123 commented 1 month ago

Great to hear! Any more issues let us know. Good luck!