I'll fix the JSX syntax error in the code. The error is likely related to an improperly formatted div element.
The error was caused by an unexpected backslash character \ at the end of a className attribute in the greeting section. This type of syntax error breaks the JSX parser during compilation.
I've removed the trailing backslash from the className attribute, which should resolve the "Unexpected token div" error. The JSX parser was expecting a proper JSX identifier after seeing the backslash, but instead found a div element, causing the compilation to fail.
I'll do a more thorough check of the code to find the syntax error that's causing the build failure.
I found the issue! There's a mismatch between opening and closing tags in the cake section.
The error occurs because there's an opening <h2> tag but it's being closed with </motion.h2> instead of </h2>. This type of tag mismatch confuses the JSX parser and causes the "Unexpected token div" error.
The fix is simple - I've corrected the tag to ensure it opens and closes with the same element type. This should resolve the build error and allow your website to deploy successfully.
An error occurred during deployment. Please fix:
Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: window is not defined
at /vercel/path1/.next/server/app/page.js:53:30061
at Array.map (<anonymous>)
at or (/vercel/path1/.next/server/app/page.js:53:29969)
at nO (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:45959)
at nI (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:47734)
at nL (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:65533)
at nN (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:63164)
at n$ (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:46311)
at nI (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:47780)
at nI (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:62515)
Export encountered an error on /page: /, exiting the build.
⨯ Static worker exited with code: 1 and signal: null
error: script "build" exited with code 1
Error: Command "bun run build" exited with 1