Skip to content
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

Possible to get logs / output? #20

Open
wilr opened this issue Jun 28, 2023 · 3 comments
Open

Possible to get logs / output? #20

wilr opened this issue Jun 28, 2023 · 3 comments

Comments

@wilr
Copy link

wilr commented Jun 28, 2023

ddev logs -f doesn't output any of the vite output. But I wonder if this is possible?

@torenware
Copy link
Owner

I'm not too surprised, since IIRC vite is running in a separate process, using a program call tmux. To see any output created by the vite process, we could do something like this:

  1. Use tmux to bring forward the vite process. I haven't tried this (or at least, haven't tried it in quite a while), but I believe you can do something like this:
tmux attach-session -t vite-sess
  1. If there was a large need for this, I could make it possible to expose stderr and stdout when I bring up the tmux session that runs vite. This would be a bit nasty, and if you can make due with (1), much better.

@JshGrn
Copy link

JshGrn commented Nov 29, 2023

I have made do with 1 but maybe there could be an additional option like ddev vite-serve listen.

The listen (or another name) argument would be the same as running npm run vite in that errors would come to stdout, I would prefer to have an open vite process rather than one running in a tmux session that I don't have output for without running 1.

@JshGrn
Copy link

JshGrn commented Dec 5, 2023

To add to this, where for some reason Vite restarts and has a error where it starts on the port +1, I have no idea on this until I use the above to realise why.

Perhaps option 2 should be looked at and at the very least the text about port being taken should be parsed and output as an error to flag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants