import { useEffect } from "react";
import type { AppProps } from "next/app";
import Script from "next/script";
import { SWRConfig } from "swr";
import { useRouter } from "next/router"
import { AppContext } from "@context/index";
import { NextIntlProvider } from 'next-intl'
function MyApp({ Component, pageProps }: AppProps) {
<SWRConfig
value={{
onErrorRetry: (error: any) => {
// Never retry on 401.
if (error.status === 401) return;
},
errorRetryCount: 2,
}}
>
<>
<NextIntlProvider messages={pageProps.messages}>
<AppContext>
<div>
<Component {...pageProps} />
</div>
</AppContext>
</NextIntlProvider>
</>
</SWRConfig>
);
}
export default MyApp;
I encountered the 'MISSING_MESSAGE' error with the originalMessage stating 'No messages were configured on the provider,' despite following the documentation for Next-intl. I have confirmed that the message is configured in the _app.tsx file within the page folder. Can anyone offer guidance on resolving this issue?