-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
List routes command fails #4
Comments
It's weird, I can't really say why. I can't reproduce the problem, either on Mac/Linux/Windows and I tried on several projects with different routes |
I can't really share it (it's private customer's code) |
Would there be a way for me to debug it locally? I'd like to add a breakpoint where the JSON.parse happens. |
The only way I can see right now would be to clone the repo and debug locally 😓 That said, it's very simple, basically: clone, npm install, add a breakpoint here:
Then press F5, it opens a new VSCode editor, open the problematic project in it, and do the ListRoutes thing Sorry to ask you this, I guess it's just a small error 😓 |
What I found is that the result of the command is truncated (the end of the output is missing). adonis-vscode-extension/src/commands/BaseCommand.ts Lines 183 to 187 in f559b92
https://nodejs.org/dist/latest-v18.x/docs/api/child_process.html#child_processexeccommand-options-callback |
I tried it (and I think it's better that way regardless), but that doesn't fix the problem. |
This is probably nodejs/node#19218 |
If I understand the problem correctly, the bug is actually in |
@thetutlage is that possible? |
@targos Maybe. Since you are debugging it all locally. Can you please add |
Thank you for investigating Michaël On my side, impossible to reproduce the problem, even with more than +500 different defined routes and thus a consequent output 🤔 |
Are you on a Mac @Julien-R44 ? |
Mostly on Windows, but I have a mac and ubuntu on hand and have been unable to reproduce the bug on all three different configurations. You are experiencing this bug on Windows, right? |
No, I can only reproduce on Mac. No issues with the same project on Windows. |
Ok finally the problem occurs under my mac with my file containing more than 500 routes ! @thetutlage I was able to add Should we add this stayAlive on ListRoutes? I don't know if this is the right solution, I will read more about it |
|
Future readers, if you encounter the same issue : |
Is it true that this is indeed an issue nodejs/node#19218, which is caused by exiting the process with And the only available solution right now is to let the process shutdown gracefully? |
Happy to provide more information if you need it.
node ace list:routes
(with or without --json) works fine in the terminal.The text was updated successfully, but these errors were encountered: