Closed starmorph closed 1 year ago
Hi @starmorph,
I was having the exact same issue but after spending an hour at it I got it successfully building on both Vercel & Locally, this is how:
schema.sql
in your SQL Editor in Supabase to create the tables. SUPABASE_HOSTNAME="db.YOUR_DATABASE_HOST.supabase.co"
NEXT_PUBLIC_SUPABASE_URL="YOUR_API_URL"
NEXT_PUBLIC_SUPABASE_ANON_KEY="YOUR_ANON_PROJECT_API_KEY"
["https://i.imgur.com/6vy29vC.png"]
(Do this if you want images)[slug].tsx
, just remove the whole div for the Swiper altogether.This solved the issue for me, let me know if it works for you :)
Nice man, this worked for me
I am getting an error while building my app on vercel and locally. on vercel it says this:
Error occurred prerendering page "/partners/testdd". Read more: https://nextjs.org/docs/messages/prerender-error
08:49:51.869 | TypeError: Cannot read properties of null (reading 'map') 08:49:51.869 | at Partner (/vercel/path1/.next/server/pages/partners/[slug].js:174:62) 08:49:51.870 | at d (/vercel/path1/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:33:498) 08:49:51.870 | at bb (/vercel/path1/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:16) 08:49:51.870 | at b.render (/vercel/path1/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:42:43) 08:49:51.870 | at b.read (/vercel/path1/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:83) 08:49:51.870 | at exports.renderToString (/vercel/path1/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:52:138) 08:49:51.870 | at Object.renderPage (/vercel/path1/node_modules/next/dist/server/render.js:680:46) 08:49:51.871 | at Object.defaultGetInitialProps (/vercel/path1/node_modules/next/dist/server/render.js:350:67) 08:49:51.871 | at Document.getInitialProps (/vercel/path1/.next/server/pages/_document.js:29:20) 08:49:51.871 | at Object. (/vercel/path1/node_modules/next/dist/shared/lib/utils.js:75:33)
Locally it says this: 2023-01-20T15:39:03.276Z Failed to compile. 2023-01-20T15:39:03.276Z
2023-01-20T15:39:03.277Z ./pages/partners/integrations/index.tsx:40:3 2023-01-20T15:39:03.277Z Type error: Expression expected. 2023-01-20T15:39:03.277Z
2023-01-20T15:39:03.277Z 38 | const [partners, setPartners] = useState(initialPartners) 2023-01-20T15:39:03.277Z 39 | const [featured, setFeatured] = 2023-01-20T15:39:03.278Z > 40 | const allCategories = Array.from( 2023-01-20T15:39:03.278Z | ^ 2023-01-20T15:39:03.278Z 41 | new Set(initialPartners.map((p) => p.category)) 2023-01-20T15:39:03.278Z 42 | ) 2023-01-20T15:39:03.278Z 43 | 2023-01-20T15:39:03.325Z Error: Command "npm run build" exited with 1 2023-01-20T15:39:03.513Z
I am on a M1 Mac running OS Venture 13.1 I have configured my supabase environment variables locally and on vercel and have added 2 rows to the partner and partner contact supabase. This problem happens once a row is created in the partners table.
Thank you very much for the help I would love to get this app working