hackerwins / codepair-old

Real-time markdown editor for interviews, meetings and more...
https://codepair-old.yorkie.dev
Apache License 2.0
90 stars 29 forks source link

Hot module replacement is not working on Docker environment #144

Closed blurfx closed 3 years ago

blurfx commented 3 years ago

What happened: HMR is not working. It doesn't detect changes, it doesn't hot reload.

What you expected to happen: React development server detect code changes, and hot reload changed module.

How to reproduce it (as minimally and precisely as possible):

  1. Run codepair with docker environment using docker-compose.dev.yml.
  2. Modify and save some jsx files.

Anything else we need to know?:

Environment:

starkensin commented 3 years ago

In my opinion, this is because container file system and local file system are not synced. Can I try this?

blurfx commented 3 years ago

@starkensin Sure!!

blurfx commented 3 years ago

OH MY GOD I just realized that I didn't bind the source code directory. 😱

starkensin commented 3 years ago

When I run docker-compose.dev.yml, it makes problem like this.

Screen Shot 2021-10-10 at 6 35 50 PM

Additionally, installing "chokidar" dependency was not a solution.

blurfx commented 3 years ago

Hmm, that's weird. I can't reproduce that problem.

Would you like to try after removing all dependencies and reinstalling?

Could you provide your current development environment? (Operating system, Docker version, etc?)

starkensin commented 3 years ago

Hmm, that's weird. I can't reproduce that problem.

Would you like to try after removing all dependencies and reinstalling?

Could you provide your current development environment? (Operating system, Docker version, etc?)

ok~! But, does the environment affect the problem even if we use docker?

environment

blurfx commented 3 years ago

If you use Linux, it can be a problem. but Windows/MacOS Docker uses virtual machines. So, I think not. maybe.

blurfx commented 3 years ago

I tested it in another environment, but there was no problem other than the chokidar compatibility issue. :(

What is printed in Docker logs? Could you try it without -d flag?