0

running "npm start" command shows a 'nginx' welcome page on browser instead of the default 'react app' starter page. I recently started practicing using docker, where i had to run "docker pull nginx", i think this is what started the problem as far as running 'npm start' in my react app folder. I did not have this problem prior to working with docker. I want to be able to run 'npm start' inside my react app folder and have it show my react app page in the browser and not the nginx server welcome page.

1 Answers1

0

I'll hazard a guess that you have a docker container running and you've configured it to map ports on your machine to port in the container. If that's the case, you should just terminate the container. Here's an example of doing this on Windows via cmd.exe:

C:\Users\HPierce>docker container ls
CONTAINER ID   IMAGE             COMMAND               CREATED       STATUS         PORTS                               NAMES
14a8bc9fc077   transcripts_web   "tail -f /dev/null"   11 days ago   Up 4 seconds   0.0.0.0:80->80/tcp, :::80->80/tcp   transcripts_web_1

C:\Users\HPierce>docker container kill 14a8bc9fc077
14a8bc9fc077

C:\Users\HPierce>docker container ls
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

You can see that the container was mapping my host's port 80 to the container's port 80.

If you have no containers running, here's a few other things you could try:

  1. Change the port that create-react-app listens on

  2. Check if Nginx is installed on your host machine and remove it or stop the server from running.

HPierce
  • 7,249
  • 7
  • 33
  • 49