Heroku 部署后刷新时出现 500(内部服务器错误):MERN 堆栈

时间:2021-02-07 17:39:18

标签: heroku mern

My Heroku logs

以下是我的 index.js 文件,我在其中使用了 react-router-dom 进行路由:

import React from 'react';
import ReactDOM from 'react-dom';
import { Route, BrowserRouter as Router } from 'react-router-dom';
import App from './App';
import Users from './Users';
import Submit from './Submit';
import reportWebVitals from './reportWebVitals';

import { Provider } from 'react-redux';
import store from './store';

// Font awesome
import { library } from '@fortawesome/fontawesome-svg-core'
import { fab } from '@fortawesome/free-brands-svg-icons'
import { faCheckSquare, faSort, faAngleDoubleLeft, faAngleDoubleRight } from '@fortawesome/free-solid-svg-icons'

library.add(fab, faCheckSquare, faSort, faAngleDoubleLeft, faAngleDoubleRight);

ReactDOM.render(
  <Provider store={store}>
    <Router>
      <div>
        <Route exact path="/" component={App} />
        <Route path="/users" component={Users} />
        <Route path="/submit" component={Submit} />
      </div>
    </Router>
  </Provider>,
  document.getElementById('root')
);

reportWebVitals();

我似乎找不到有关内部服务器错误的问题(我在刷新“/users”页面后发现了该错误)。有人可以告诉我可能是什么问题吗? 提前致谢!

0 个答案:

没有答案