When attempting to deploy my website using Vercel and generating static pages, I encountered the following error in the logs:
info - Generating static pages (0/6)
Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at a.b.render (/vercel/path0/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:45:32)
...
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Command "yarn run build" exited with 1
Despite trying to resolve it by following Next.js' Prerender error guide, the issue persists.
Below is the structure of my pages
directory:
π¦pages
β£ πapi
β β£ πauth
β β β π[...nextauth].js
...
β π_app.js
Here's the content of my index.js
file:
import Head from "next/head"
...
export default function Home() {
return (
<>
<Head>
<title>Skill Up | Credit Based Learning</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<div className={styles.container}>
<Header />
...
<Footer />
</div>
</>
)
}
Any help or suggestions would be greatly appreciated. Thank you!