title: How to make yarn start work inside Docker image with react-scripts 3.4 and babel-loader 8.1?
body: <p>I'm building a Docker image for debugging of my React application with a separate <code>Dockerfile</code> </p>
  
  <pre><code>FROM node:11-alpine
  
  COPY package.json .
  COPY yarn.lock .
  RUN yarn install
  
  COPY public/ ./public/
  COPY src/ ./src/
  
  EXPOSE 3000
  CMD yarn run start
  </code></pre>
  
  <p>with <code>package.json</code></p>
  
  <pre><code>{
    "name": "yarn-start-in-kubernetes",
    "version": "0.1.0",
    "private": true,
    "dependencies": {
      "react": "^16.8.1",
      "react-dom": "^16.8.1",
      "react-scripts": "2.1.3",
      "babel-loader": "8.0.4"
    },
    "scripts": {
      "start": "react-scripts start",
      "build": "react-scripts build",
      "test": "react-scripts test",
      "eject": "react-scripts eject"
    },
    "browserslist": [
      "&gt;0.2%",
      "not dead",
      "not ie &lt;= 11",
      "not op_mini all"
    ]
  }
  </code></pre>
  
  <p>which starts the development server as expected when the image is used with <code>docker run</code>. An upgrade to</p>
  
  <pre><code>    "react-scripts": "2.1.3",
      "babel-loader": "8.0.4"
  </code></pre>
  
  <p>causes the setup to be no longer usable because the development server terminates:</p>
  
  <pre><code>&gt; docker run dev
  yarn run v1.15.2
  $ react-scripts start
  ℹ ｢wds｣: Project is running at http://172.17.0.2/
  ℹ ｢wds｣: webpack output is served from 
  ℹ ｢wds｣: Content not from webpack is served from /public
  ℹ ｢wds｣: 404s will fallback to /
  Starting the development server...
  
  Done in 2.72s.
  </code></pre>
  
  <p>The <code>docker run</code> returns after <code>Done in ...</code>.</p>
  
  <p>I'd like to use the more up-to-date versions which work fine in production. How can I make them work in the debugging image?</p>
  
  <p>The versions don't seem to affect the functioning of the development server outside Docker, i.e. <code>yarn start</code> works with both version combinations.</p>