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

hivemind does not work correctly with webpack-dev-server. #3

Open
lisovskyvlad opened this issue May 16, 2017 · 11 comments
Open

hivemind does not work correctly with webpack-dev-server. #3

lisovskyvlad opened this issue May 16, 2017 · 11 comments

Comments

@lisovskyvlad
Copy link

Hello,

thanks for this great process manager!

After rails 5.1 introduced webpack, I tried to keep webpack-dev-server and rails 5 running in parallel. Unfortinually, with hivemind it does not work, webpack-dev-server just does not produce any output after starting.

Procfile:

web: bundle exec rails s
assets: ./bin/webpack-dev-server

Output after typing hivemind

web    | Running...
assets | Running...
assets |  10% building modules 1/1 modules 0 active                                         
assets | Project is running at http://localhost:8080/
assets | webpack output is served from http://localhost:8080/packs/
assets | Content not from webpack is served from /Users/lisovskiivladislav/work/factory/factory-management-backend/public/packs
assets | 404s will fallback to /index.html
web    | => Booting Puma
web    | => Rails 5.1.0 application starting in development on http://localhost:3000
web    | => Run `rails server -h` for more startup options
web    | Puma starting in single mode...
web    | * Version 3.8.2 (ruby 2.4.1-p111), codename: Sassy Salamander
web    | * Min threads: 5, max threads: 5
web    | * Environment: development
web    | * Listening on tcp://0.0.0.0:3000
web    | Use Ctrl-C to stop

If to launch 2 processes each in an own tab, it works.

@DarthSim
Copy link
Owner

Hi Vlad, glad to see you here!

Sorry, I can't reproduce the bug (http://img.darthsim.me/iq8tr.png). Do you use the latest version of Hivemind?

@lisovskyvlad
Copy link
Author

Hey, yeah, last version

$ hivemind -v          
Hivemind version 1.0.1

okay, looks like for the current project it does not work :(

@DarthSim
Copy link
Owner

Does https://github.com/DarthSim/overmind work the same way?

@lisovskyvlad
Copy link
Author

Yeah, overmind works for me :), thanks for great tools!

@sheerun
Copy link

sheerun commented Nov 20, 2017

@DarthSim This issue is probably because you not only let sub-processes know they are in tty session, but also that they are in interactive terminal what is a lie

@fredoliveira
Copy link

fredoliveira commented Jan 16, 2018

This issue is still relevant and still exists ;-) In fact, even in overmind, the issue is similar. To get webpack-dev-server to do anything I have to connect to the tmux session and hit a key.

@DarthSim
Copy link
Owner

As I said, I can't reproduce the issue. I'll open it with help wanted label.

@ncastro
Copy link

ncastro commented Feb 28, 2018

For me this error happened after I had the bootstrap-vue module. Without it, it works fine.

And more, if I comment the bootstrap-vue import line, start the server and after uncomment the line, webpack will work just fine. But if I let the import statement there, wepack won't compile and I've to start the rails server and webpack server separately for it to work.

My hivemind version is 1.0.4.

@srcrip
Copy link

srcrip commented Feb 21, 2021

I also get this problem on Hivemind version 1.0.6. Webpack dev server runs fine in overmind, but not in hivemind.

I haven't gone super deep into debugging like trying to watch the actual output of the pty for each process, but just by watching hiveminds output it seems like the webpack dev server just hangs after printing this line:

Starting development server...

It then just sits there forever and nothing happens. Could an option be added to hivemind to specify whether a process should be tricked into thinking its on an interactive tty or not? I feel like that does have something to do with this.

This is tangentially related but I would also personally love the feature in a process runner to strip certain terminal escape codes from output. Many tools like webpack's dev server send a code to clear the terminal before printing something. This unfortunately wipes out whatever was visible in the terminal. I think it would be doable to just strip certain codes out of the process's output though.

@DarthSim
Copy link
Owner

Could an option be added to hivemind to specify whether a process should be tricked into thinking its on an interactive tty or not?

You can do this without Overmind. Just add | cat to the command like this:

assets: bin/webpack-dev-server | cat

This will redirect the process's output to cat disconnecting the process from tty/pty.

@srcrip
Copy link

srcrip commented Mar 6, 2021

Interesting, but unfortunately that does not fix the problem between hivemind and webpack-dev-server. It still ends up hanging the webpack dev server process unresponsively.

I'm sure this is more of a case of webpack-dev-server being weird then hivemind doing anything wrong, but it'd be sweet if we could figure out the why and get a workaround in the README, considering how popular webpack is.

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

No branches or pull requests

6 participants