amazon-clone was forked. Continue chatting to ask questions about or make changes to it.
An error occurred during deployment. Please fix:
Build Error:
Failed to compile.
./app/page.tsx
Error:
x Expected ',', got 'string literal (../src/main, "../src/main")'
,-[/vercel/path1/app/page.tsx:1:1]
1 | "use client"
2 |
3 | import from "../src/main"
: ^^^^^^^^^^^^^
4 |
5 | export default function SyntheticV0PageForDeployment() {
6 | return < />
`----
Caused by:
Syntax Error
I understand there's an error in the app/page.tsx
file. Let's fix this issue.
Let's update the app/page.tsx
file to fix this error:
This change does the following:
App
component from "../src/App" instead of an empty import from "../src/main".SyntheticV0PageForDeployment
function to render the App
component.This should resolve the syntax error and allow the project to compile successfully. The App
component will now be rendered as the main content of the page.
Is there anything else you'd like me to modify or explain further?
An error occurred during deployment. Please fix:
Resolving dependencies
Resolved, downloaded and extracted [1070]
Saved lockfile
$ next build
ReferenceError: document is not defined
at C (/vercel/path1/.next/server/app/page.js:20:32675)
at v (/vercel/path1/.next/server/app/page.js:20:31102)
at ns (/vercel/path1/.next/server/app/page.js:39:2110)
at nj (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:46251)
at nM (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47571)
at nN (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64546)
at nI (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47010)
at nM (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47717)
at nN (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64546)
at nI (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47010) {
digest: '1236511724'
}
Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
ReferenceError: document is not defined
at C (/vercel/path1/.next/server/app/page.js:20:32675)
at v (/vercel/path1/.next/server/app/page.js:20:31102)
at ns (/vercel/path1/.next/server/app/page.js:39:2110)
at nj (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:46251)
at nM (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47571)
at nN (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64546)
at nI (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47010)
at nM (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47717)
at nN (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64546)
at nI (/vercel/path1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47010)
> Export encountered errors on following paths:
/page: /
error: script "build" exited with code 1
Error: Command "bun run build" exited with 1