Update 3/23: I used author's package.json, npm install on my Mac, upgrade react-scripts to 3.4.0 and Dockerfile to fix a few issues and now this version works: https://github.com/harrywang/my-flask-react-auth/tree/6e65a7deaf89244a41a7c91843f07f4756956f95 however, this does not explain why the previous version did not work.
Update 3/23: if I only replace package.json and package-lock.json at https://github.com/harrywang/my-flask-react-auth/tree/master/services/client with the authors' versions at https://gitlab.com/testdriven/flask-react-auth/-/tree/master/services%2Fclient, it will work. Don't know why.
Following the tutorial at https://testdriven.io/courses/auth-flask-react/
Docker 2.2.0.4 Desktop on Mac
My code repo is at https://github.com/harrywang/my-flask-react-auth, where you can see the Dockerfile and docker-compose.yml, you can clone and run docker-compose up -d --build
to reproduce my problem.
When I run docker-compose up -d --build
, the flask and database containers work well but the node container exits with error code 0 when "Starting the development server..."
One thing I noticed is that I don't see [wds] webpack related info locally on my Mac. I don't know what they are.
but when I go to /services/client and run npm start
, the node server starts and works well locally.
There is no error message during the docker building process. I have spent a few hours on this and cannot figure it out. Please help!! Thanks a lot!!
However, the author's repo at https://gitlab.com/testdriven/flask-react-auth with older versions does not have this issue: