title: Webpack error: Can't resolve 'fbjs/lib/EventListener'
body: <p>I'm trying to add react to my existing web app. I successfully installed all required npm modules but after running <code>npm run wbp</code> command I got a lot of errors like:</p>
  
  <pre><code>ERROR in ./node_modules/react-dom/cjs/react-dom.production.min.js
  Module not found: Error: Can't resolve 'fbjs/lib/EventListener'
  
  ERROR in ./node_modules/react/cjs/react.production.min.js
  Module not found: Error: Can't resolve 'object-assign'
  </code></pre>
  
  <p>Webpack version:</p>
  
  <pre><code>Version: webpack 4.1.1
  </code></pre>
  
  <p>My webpack.config.js:</p>
  
  <pre><code>const path = require('path');
  
  module.exports = {
      entry: path.join(__dirname, '/wwwroot/js/stats.jsx'),
      output: {
          path: path.join(__dirname, 'wwwroot/js/'),
          filename: 'admin.js'
      },
      resolve: {
          extensions: ['.jsx']
      },
      module: {
          rules: [
              {
                  test: /\.jsx?$/,
                  loader: 'babel-loader',
                  query: {
                      cacheDirectory: true,
                      presets: ['@babel/preset-react', '@babel/preset-env']
                  }
              }
          ]
      }
  };
  </code></pre>
  
  <p>My package.json:</p>
  
  <pre><code>    {
    "name": "WebSite",
    "version": "1.0.0",
    "description": "",
    "scripts": {
      "test": "echo \"Error: no test specified\" &amp;&amp; exit 1",
      "wbp": "webpack --display-error-details --mode production"
    },
    "keywords": [],
    "author": "",
    "license": "ISC",
    "devDependencies": {
      "@babel/core": "^7.0.0-beta.40",
      "@babel/preset-env": "^7.0.0-beta.40",
      "@babel/preset-react": "^7.0.0-beta.40",
      "babel-loader": "^8.0.0-beta.0",
      "cjs": "0.0.11",
      "fbjs": "^0.8.16",
      "react": "^16.2.0",
      "react-dom": "^16.2.0",
      "webpack": "^4.1.1",
      "webpack-cli": "^2.0.10"
    }
  }
  </code></pre>
  
  <p>I tried to solve this problem with manual mapping path to fbjs but without success. What am I doing wrong?</p>
  
  <p><strong>UPD:</strong> <code>webpack --display-error-details --mode development</code> generated admin.js for me but also showed me error. Browser console shows me <code>react.development.js:17 Uncaught Error: Cannot find module "object-assign"</code> error in this case</p>