Reactjs Next.js-Browser back给出---TypeError:无法读取属性';拆分';未定义的

Reactjs Next.js-Browser back给出---TypeError:无法读取属性';拆分';未定义的,reactjs,react-redux,next.js,Reactjs,React Redux,Next.js,我的问题与此类似。。 我使用的是自定义服务器,但我没有使用任何自定义路由处理。即使删除自定义服务器并仅运行“下一步”,使用“浏览器后退”按钮返回时也会出现此错误。 如中所述 我没有在任何地方操纵历史。但我还是犯了这个错误。 我正在使用next/路由器进行路由 这是_app.js代码 import React from 'react'; import App from 'next/app'; import Router from 'next/router'; import Head from '

我的问题与此类似。。 我使用的是自定义服务器,但我没有使用任何自定义路由处理。即使删除自定义服务器并仅运行“下一步”,使用“浏览器后退”按钮返回时也会出现此错误。 如中所述 我没有在任何地方操纵历史。但我还是犯了这个错误。 我正在使用next/路由器进行路由

这是_app.js代码

import React from 'react';
import App from 'next/app';
import Router from 'next/router';
import Head from 'next/head';
import withRedux from 'withRedux';
import { Provider } from 'redux-bundler-react';
import { ThemeProvider } from 'emotion-theming';
import { Global } from '@emotion/core';
import themeOne from 'ui-web/theme';
import { getCookie } from 'modules/authentication';
import configureStore from '../../src/store';
import { persist, cacheVersions } from '../../src/common';
import { appWithTranslation } from '../../i18n';
const makeStore = initialState => configureStore(initialState);
class MyApp extends App {
  static async getInitialProps(props) {
    const { Component, ctx, router } = props;
    if (ctx.isServer && ctx.req.headers.cookie) {
      const token = getCookie('authToken', ctx.req);
      ctx.store.doSetAuthToken(token);
    }
    const pageProps = Component.getInitialProps
      ? await Component.getInitialProps(ctx, router.pathname)
      : {};
    return { pageProps };
  }
  render() {
    const { Component, store, pageProps } = this.props;
    return (
      <Provider store={store}>
        <ThemeProvider theme={themeOne}>
          <Head>
            <title>Learny</title>
            <link
              href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,600&display=swap'
              rel='stylesheet'
            />
          </Head>
          <Global
            styles={theme => ({
              body: {
                margin: 0,
                overflowX: 'hidden',
                backgroundColor: theme.colors.background,
                a: {
                  textDecoration: 'none',
                },
              },
            })}
          />
          <Component {...pageProps} />
        </ThemeProvider>
      </Provider>
    );
  }
}
export default withRedux(makeStore, { debug: false, persist, cacheVersions })(
  appWithTranslation(MyApp)
);


请显示stacktrace?i.stack.imgur.com/QcMor.png@evgenytimoshenko请不要将错误或堆栈跟踪作为图像,并在问题中使用链接。请显示stacktrace?i.stack.imgur.com/QcMor.png@evgenytimoshenko请不要将错误或堆栈跟踪作为图像,并在问题中使用链接
/* eslint-disable @typescript-eslint/no-var-requires */
const express = require('express');
const next = require('next');
const nextI18NextMiddleware = require('next-i18next/middleware').default;

const nextI18next = require('./i18n');

const port = process.env.PORT || 3000;
const app = next({ dev: process.env.NODE_ENV !== 'production' });
const handle = app.getRequestHandler();

(async () => {
  await app.prepare();
  const server = express();

  server.use(nextI18NextMiddleware(nextI18next));

  server.all('*', (req, res) => handle(req, res));

  await server.listen(port);
  console.log(`> Ready on http://localhost:${port}`);
})();