title: webpack-dev-server runs out of memory doing react development in dev container
body: <p>I am developing a react application inside of a vscode dev container and the development server keeps crashing with the following message:</p>
  <pre><code>The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
  </code></pre>
  <p>I also noticed a deprecation warning on the dev server that I thought might be related:</p>
  <p><a href="https://i.stack.imgur.com/KAsdv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KAsdv.png" alt="enter image description here" /></a></p>
  <p>I am not sure if the problem here is an issue with webpack (maybe related to the deprecation warning) or if somehow the container has limited resources and I just need to allocate more memory for it? I'm feeling very much out of my depth here. Any help would be much appreciated.</p>
  <p>devcontainer.json:</p>
  <pre><code>// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
  // https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/javascript-node
  {
      &quot;name&quot;: &quot;Node.js&quot;,
      &quot;build&quot;: {
          &quot;dockerfile&quot;: &quot;Dockerfile&quot;,
          // Update 'VARIANT' to pick a Node version: 16, 14, 12.
          // Append -bullseye or -buster to pin to an OS version.
          // Use -bullseye variants on local arm64/Apple Silicon.
          &quot;args&quot;: { &quot;VARIANT&quot;: &quot;16-bullseye&quot; }
      },
  
      // Set *default* container specific settings.json values on container create.
      &quot;settings&quot;: {},
  
      // Add the IDs of extensions you want installed when the container is created.
      &quot;extensions&quot;: [
          &quot;dbaeumer.vscode-eslint&quot;
      ],
  
      // Use 'forwardPorts' to make a list of ports inside the container available locally.
      // &quot;forwardPorts&quot;: [],
  
      // Use 'postCreateCommand' to run commands after the container is created.
      // &quot;postCreateCommand&quot;: &quot;yarn install&quot;,
  
      // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
      &quot;remoteUser&quot;: &quot;node&quot;
  }
  </code></pre>
  <p>Dockerfile:</p>
  <pre><code># See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/javascript-node/.devcontainer/base.Dockerfile
  
  # [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster
  ARG VARIANT=&quot;16-bullseye&quot;
  FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
  
  # [Optional] Uncomment this section to install additional OS packages.
  # RUN apt-get update &amp;&amp; export DEBIAN_FRONTEND=noninteractive \
  #     &amp;&amp; apt-get -y install --no-install-recommends &lt;your-package-list-here&gt;
  
  # [Optional] Uncomment if you want to install an additional version of node using nvm
  # ARG EXTRA_NODE_VERSION=10
  # RUN su node -c &quot;source /usr/local/share/nvm/nvm.sh &amp;&amp; nvm install ${EXTRA_NODE_VERSION}&quot;
  
  # [Optional] Uncomment if you want to install more global node modules
  # RUN su node -c &quot;npm install -g &lt;your-package-list-here&gt;&quot;
  </code></pre>
  <p>package.json:</p>
  <pre><code>{
    &quot;name&quot;: &quot;some project&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@auth0/auth0-react&quot;: &quot;^1.10.1&quot;,
      &quot;@testing-library/jest-dom&quot;: &quot;^5.16.4&quot;,
      &quot;@testing-library/react&quot;: &quot;^13.2.0&quot;,
      &quot;@testing-library/user-event&quot;: &quot;^13.5.0&quot;,
      &quot;axios&quot;: &quot;^0.27.2&quot;,
      &quot;react&quot;: &quot;^18.1.0&quot;,
      &quot;react-detect-click-outside&quot;: &quot;^1.1.7&quot;,
      &quot;react-dom&quot;: &quot;^18.1.0&quot;,
      &quot;react-places-autocomplete&quot;: &quot;^7.3.0&quot;,
      &quot;react-router-dom&quot;: &quot;^6.3.0&quot;,
      &quot;react-scripts&quot;: &quot;5.0.1&quot;,
      &quot;styled-components&quot;: &quot;^5.3.5&quot;,
      &quot;web-vitals&quot;: &quot;^2.1.4&quot;
    },
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;react-scripts start&quot;,
      &quot;build&quot;: &quot;react-scripts build&quot;,
      &quot;test&quot;: &quot;react-scripts test&quot;,
      &quot;eject&quot;: &quot;react-scripts eject&quot;
    },
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: [
        &quot;react-app&quot;,
        &quot;react-app/jest&quot;
      ]
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    },
    &quot;devDependencies&quot;: {
      &quot;prettier&quot;: &quot;^2.7.1&quot;
    }
  }
  </code></pre>