I'm using NextJS 13.4 with app router. My not found page is located in /app/not-found.tsx
which works fine in development. The content of the page is below:
import { HOMEPAGE_ROUTE } from "../consts/routes";
import Link from "next/link";
const NotFound = () => {
return (
<div>
<Link href={HOMEPAGE_ROUTE}>
<img
src="/assets/logo.png"
alt="Logo"
></img>
</Link>
<h1>Not found</h1>
<Link href={HOMEPAGE_ROUTE}>
Back to home
</Link>
</div>
);
};
export default NotFound;
I am using this to generate a static site with next build
which has worked perfectly until adding the not-found page.
However since introducing the not-found page when it comes to deploying to production (firebase in my case) I see the following log:
Building a Cloud Function to run this application. This is needed due to:
• non-static component /_not-found
Since I have had no need for dynamic rendering up until this point I would prefer this not be the case. How can I make this component static?
I have read the documentation and can't find any mention of this issue. It was my understanding that as the page did not have any props this page would be static