ndimatteo / HULL

💀 Headless Shopify Starter – powered by Next.js + Sanity.io
https://hull.dev
MIT License
1.38k stars 173 forks source link

Cannot sync shopify with sanity studio #36

Closed xnslx closed 3 years ago

xnslx commented 3 years ago

Hey, here is the question. I fully delete the dummy data in the sanity studio of the HULL template.

Screen Shot 2021-08-22 at 11 50 31 PM

But I encounter a new problem. When I deploy the application to Vercel, it constantly fails with this error.


23:44:07.462 | > Build error occurred
-- | --
23:44:07.464 | TypeError: Cannot read property 'split' of null
23:44:07.465 | at /vercel/path0/.next/server/pages/[...slug].js:85:29
23:44:07.465 | at Array.map (<anonymous>)
23:44:07.465 | at getStaticPaths (/vercel/path0/.next/server/pages/[...slug].js:83:74)
23:44:07.466 | at processTicksAndRejections (internal/process/task_queues.js:95:5)
23:44:07.466 | at async buildStaticPaths (/vercel/path0/node_modules/next/dist/build/utils.js:16:80)
23:44:07.466 | at async /vercel/path0/node_modules/next/dist/build/utils.js:26:622
23:44:07.466 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/telemetry/trace/trace.js:6:584) {
23:44:07.466 | type: 'TypeError'
23:44:07.466 | }

It totally makes sense since there is no product being added to the sanity studio. But since the application fails to deploy to Vercel, there is no way that the Shopify webhooks can be fired, it relies on the live URL. So… I kind of entering a rabbit hole, that without syncing products to sanity studio, the application can not be deployed. Without being deployed, the Shopify products cannot be synced. Is there anything that I can do to roughly set up the application and successfully deploy it to Vercel so as to sync Shopify products to sanity studio?😊

inezabonte commented 3 years ago

How about adding loading skeletons In place of where your data is not available.

xnslx commented 3 years ago

My fault. Problem solved.

patrickbjohnson commented 3 years ago

@xnslx if you don't mind me asking, what was your solution? Running into a similar issue here and having trouble tracking it.

xnslx commented 3 years ago

@patrickbjohnson Hey. I solve it and it is actually my own fault. When you set up everything and add products to Shopify, it will be automatically synced with sanityio.

xnslx commented 3 years ago

@patrickbjohnson Can I know what is the error message?