Javascript 网页包开发服务器错误:不变冲突:缩小反应错误#200

Javascript 网页包开发服务器错误:不变冲突:缩小反应错误#200,javascript,webpack,webpack-dev-server,Javascript,Webpack,Webpack Dev Server,当浏览器控制台试图将带有脚本标记的index.html文件加载到bundle.js文件时,我在浏览器控制台中看到标题错误。我刚刚完成了使用自己的index.html和编译的main.js文件指向/dist的教程,所以我不明白为什么我自己的bundle.js会收到与缩小相关的错误: react-dom.production.min.js:13 Uncaught Invariant Violation: Minified React error #200; visit https://reactjs

当浏览器控制台试图将带有脚本标记的index.html文件加载到bundle.js文件时,我在浏览器控制台中看到标题错误。我刚刚完成了使用自己的index.html和编译的main.js文件指向/dist的教程,所以我不明白为什么我自己的bundle.js会收到与缩小相关的错误:

react-dom.production.min.js:13 Uncaught Invariant Violation: Minified React error #200; visit https://reactjs.org/docs/error-decoder.html?invariant=200 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. 
    at http://localhost:8080/bundle.js:22:420
    at o (http://localhost:8080/bundle.js:22:523)
    at Object.render (http://localhost:8080/bundle.js:22:104077)
    at Module.<anonymous> (http://localhost:8080/bundle.js:6:1229)
    at P (http://localhost:8080/bundle.js:1:7211)
    at http://localhost:8080/bundle.js:1:8035
    at http://localhost:8080/bundle.js:1:8043
(anonymous) @   react-dom.production.min.js:13
o   @   react-dom.production.min.js:14
render  @   react-dom.production.min.js:266
(anonymous) @   index.jsx:16
P   @   bootstrap:726
(anonymous) @   bootstrap:793
(anonymous) @   bootstrap:793

因此,错误消息包含一个链接,您可以看到您的初始化代码和目标容器出现了问题,您尝试渲染的目标容器无法找到。看起来我忘记设置要注入的div。现在可以工作了,谢谢@SeanD你能帮我做些什么吗。您添加了什么来解决此问题?因此,错误消息中包含一个链接,您可以看到您的初始化代码和您尝试渲染的目标容器出现问题,但无法找到。看起来我忘记设置要注入的div。现在可以工作了,谢谢@SeanD你能帮我做些什么吗。您添加了什么来解决此问题?
const webpack = require("webpack");
const dotenvWebpack = require("dotenv-webpack");
const path = require("path");

module.exports = {
  entry : {
    './adminSettingsArea' :
      './adminSettingsArea/src/index.jsx'
  },
  output : {
    filename : '[name]/bundle.js',
    path : path.resolve(__dirname),
  },
  devtool: 'inline-source-map',
  devServer : {
    "contentBase" : './adminSettingsArea',
    "hot" : true
  },
  plugins : [
    new webpack.HotModuleReplacementPlugin(),
    new dotenvWebpack()
  ],
  module : {
    rules : [
      {
        test : /\.(js|jsx)$/,
        exclude : [/node_modules/, /vendor/],
        use : {
          loader : "babel-loader",
          options : {
            presets : [
              '@babel/preset-env',
              "@babel/preset-react"
            ]
          },
        }
      }
    ],
  },
};