yarn build is throwing Type error: Type 'null' is not assignable to type 'UserConfig'.
8.0.2
Contents of next-i18next.config.js:
module.exports = {
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
};
Contents of next.config.js:
const { i18n } = require('./next-i18next.config');
module.exports = {
i18n,
};
Contents of pages/_app.tsx:
import { wrapper } from '@core/redux/store';
import type { AppProps } from 'next/app';
import React from 'react';
import { appWithTranslation } from 'next-i18next';
const App = ({ Component, pageProps }: AppProps) => {
return <Component {...pageProps} />;
};
export default appWithTranslation(wrapper.withRedux(App));
Contens of pages/index.tsx:
import Locale from '@custom-types/locale';
import { NextPage } from 'next';
import { useTranslation } from 'next-i18next';
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
import React from 'react';
type IProps = {
hello: string;
};
const IndexPage: NextPage<IProps> = ({ hello }) => {
const { t } = useTranslation('common');
return (
<div>
<h1>{t('h1')}</h1>
{hello}
</div>
);
};
export async function getServerSideProps({ locale }: Locale) {
return {
props: {
hello: 'world',
...(await serverSideTranslations(locale, ['common', 'footer'])),
},
};
}
export default IndexPage;
yarn build should build the Next.js project without throwing any errors.

This issue probably has a similar root cause to #995
This issue probably has a similar root cause to #995
Yeah, probably. I don't have the problem if I use 8.0.1.
I'm going to close this in favour of #995. I have created a repo there and would love if someone can assist in helping me repro these issues. Thanks!
Most helpful comment
I'm going to close this in favour of #995. I have created a repo there and would love if someone can assist in helping me repro these issues. Thanks!