许多内部服务器错误

Posted

技术标签:

【中文标题】许多内部服务器错误【英文标题】:Many Internal Server Errors 【发布时间】:2019-04-10 10:07:08 【问题描述】:

由于某些包不兼容,我已将大多数条目的 package.json 更新为最新版本,但是现在当我启动应用程序时,它会在浏览器中显示一长串错误:

启动应用程序时出错。 AggregateException:发生一个或多个错误。 (DLL参考插件无效选项

options.manifest.content['./node_modules/fbjs/lib/invariant.js']['meta'] 是无效的附加属性

options.manifest.content['./node_modules/fbjs/lib/warning.js']['meta'] 是无效的附加属性

options.manifest.content['./node_modules/react-dom/lib/reactProdInvariant.js']['meta'] 是无效的附加属性

options.manifest.content['./node_modules/object-assign/index.js']['meta'] 是无效的附加属性

options.manifest.content['./node_modules/react-dom/lib/ReactDOMComponentTree.js']['meta'] 是无效的附加属性

options.manifest.content['./node_modules/fbjs/lib/ExecutionEnvironment.js']['meta'] 是无效的附加属性

options.manifest.content['./node_modules/jquery/dist/jquery.js']['meta'] 是无效的附加属性

options.manifest.content['./node_modules/react/react.js']['meta'] 是无效的附加属性

它会不断出现大约 500 个错误。构建项目时没有编译错误。这是我的 package.json:

  "private": true,
  "version": "0.0.0",
  "devDependencies": 
    "@types/history": "^4.7.2",
    "@types/react": "~16.0.2",
    "@types/react-dom": "~16.0.9",
    "@types/react-hot-loader": "~4.1.0",
    "@types/react-router": "~4.4.0",
    "@types/react-router-dom": "~4.3.1",
    "@types/seamless-immutable": "^7.1.1",
    "aspnet-webpack-react": "~4.0.0",
    "awesome-typescript-loader": "3.2.1",
    "bootstrap": "3.3.7",
    "css-loader": "0.28.4",
    "event-source-polyfill": "0.0.9",
    "extract-text-webpack-plugin": "3.0.2",
    "file-loader": "0.11.2",
    "isomorphic-fetch": "2.2.1",
    "jquery": "3.2.1",
    "json-loader": "0.5.4",
    "react-hot-loader": "~4.3.12",
    "react-router-dom": "~4.3.1",
    "style-loader": "0.18.2",
    "typescript": "~3.1.6",
    "url-loader": "0.5.9",
    "webpack": "4.25.1",
    "webpack-hot-middleware": "2.18.2",
    "@types/webpack-env": "1.13.0",
    "aspnet-webpack": "3.0.0",
    "webpack-dev-middleware": "3.4.0",
    "@types/deep-freeze": "^0.1.1",
    "@types/deep-freeze-es6": "^1.0.0",
    "@types/material-ui": "^0.20.4",
    "@types/react-datepicker": "~1.1.7",
    "@types/react-virtualized": "~9.18.7",
    "a-react-timepicker": "~2.0.0"
  ,
  "dependencies": 
    "deep-freeze-es6": "https://registry.npmjs.org/deep-freeze-es6/-/deep-freeze-es6-1.0.1.tgz",
    "history": "https://registry.npmjs.org/history/-/history-4.6.3.tgz",
    "react-datepicker": "~1.8.0",
    "react-timekeeper": "~1.0.9",
    "react-virtualized": "~9.21.0",
    "seamless-immutable": "^7.1.2",
    "react": "~16.6.0",
    "react-dom": "~16.6.0",
    "moment": "2.20.0"
  

有人知道为什么会这样吗?我搜索了多个帖子,似乎人们总是有几个错误。不是 500。

【问题讨论】:

似乎是 webpack 和 meta 选项属性的问题。您可能想要降级您正在使用的 webpack 版本和/或向 webpack 开发人员提交问题。 【参考方案1】:

不知道你有没有解决,但是我更新到Webpack 4时遇到了同样的问题。解决方案是从webpack.config.vendor.js 运行DllPlugin,以便vendor-manifest.json 获得最新的属性。

为此,在packages.json 中将这一行放在脚本部分

  "scripts": 
    "build": "webpack --config webpack.config.vendor.js",
  

从控制台运行npm run build

【讨论】:

以上是关于许多内部服务器错误的主要内容,如果未能解决你的问题,请参考以下文章

内部服务器错误:Laravel CentOs 7

从 javascript 调用 webmethod 时出现 ASP.NET 500 内部服务器错误

Linux将许多内部IP映射到一个外部IP [关闭]

HTTP 500 内部服务器错误怎么办?

postman报内部服务器错误跟360软件有关系吗

HTTP 500内部服务器错误怎么解决。