Closed iceteabottle closed 2 years ago
Hey, can you share a public repo reproducing the issue so I can have a look at it?
One of the most common reasons for this kind of problem is some misconfiguration leading to the plugin not finding the spec file.
See also https://github.com/trumbitta/nx-trumbitta/issues/44
Thanks for your response. Sadly no. It's all closed source 🙈 I guess it's not possible to easy reproduce this. Is it possible to get some verbose output from the generation script?
We ran into this issue as well! And to debug we made this change: https://github.com/trumbitta/nx-trumbitta/pull/71
However, for some really really strange reason, logging it seems to make it work again. Maybe it's some interaction with the spawned child process handlers? Perhaps the spawned child process hangs waiting for the stdout buffer to flush?
In any case, you can try this out by locally installing the package from that branch.
Perhaps this thread: https://stackoverflow.com/questions/20792427/why-is-my-node-child-process-that-i-created-via-spawn-hanging is related
Yup, seems related and the fix from #71 checks out!
I never experienced this issue myself (every time it hangs for me is because of a misconfiguration or because it's unable to reach a remotely published spec file) but I'd ✨ happily ✨ merge #71 when it's ready!
Thanks @youngchen7! It doesn't hang anymore.
I have a problem with the api generation within a quite huge nx workspace:
And that's it. No more output, the command hangs... I have multiple apis to generate and now the second api has the same problem.
My workaround is to use the openapi-generator-cli without this nx plugin. This is also the "proof" that the problem seems to be in this pugin...
Sadly I cannot share my api spec file since it's closed source.
Any idea? Honestly I have no idea to debug it.