【问题标题】:React TypeError: Cannot read property 'forEach' of undefined in ProductionReact TypeError:无法读取生产中未定义的属性'forEach'
【发布时间】:2020-03-28 08:41:46
【问题描述】:

我们有一个 Node 后端 en react 前端应用程序托管在 Heroku 上。

在 Heroku 服务器上,我们会看到一些带有错误消息的页面。 React 在 localhost 上运行良好。

我们尝试了不同的“反应脚本”:“3.1.2”和“反应脚本”:“3.2.0”。我们使用的是 3.0.1 版本。

错误=

Error message

我们的 react package.json 文件。

"dependencies": {
"@material-ui/core": "^3.9.2",
"@material-ui/icons": "^3.0.2",
"@material-ui/styles": "^4.4.1",
"@types/googlemaps": "3.30.16",
"@types/markerclustererplus": "2.1.33",
"ajv": "6.9.1",
"animate.css": "3.7.0",
"axios": "^0.18.1",
"classnames": "2.2.6",
"history": "4.7.2",
"http-proxy-middleware": "^0.19.0",
"moment": "2.24.0",
"node-sass": "^4.11.0",
"nouislider": "13.1.0",
"prop-types": "15.7.1",
"react": "16.8.1",
"react-animate-on-scroll": "2.1.5",
"react-datetime": "2.16.3",
"react-dom": "16.8.1",
"react-ga": "^2.5.7",
"react-google-maps": "9.4.5",
"react-helmet": "^5.2.1",
"react-image-gallery": "0.8.12",
"react-redux": "^6.0.0",
"react-router-dom": "4.3.1",
"react-scripts": "3.1.2",
"react-slick": "0.23.2",
"react-swipeable-views": "0.13.1",
"react-table": "^6.9.2",
"react-tagsinput": "3.19.0",
"redux": "^4.0.1",
"redux-form": "^8.1.0",
"redux-thunk": "^2.3.0",
"typescript": "^3.5.3"

【问题讨论】:

    标签: reactjs heroku


    【解决方案1】:

    错误已解决。问题出在“react-table”:“^6.9.2”,请参阅:

    https://github.com/tannerlinsley/react-table/issues/1686

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-03-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-18
      • 2021-07-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多