question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Shopify not syncing to Sanity

See original GitHub issue

I am following the guide trying to set everything up, but when trying to sync all my Shopify products to Sanity I am getting stuck and I am not sure what is wrong. I did deploy everything on Netlify but when watching the Function log is do get the following error:

1:52:17 PM: Duration: 2.61 ms	Memory Usage: 69 MB	Init Duration: 183.30 ms	

1:53:03 PM: 2021-03-14T12:53:03.184Z	97f2d275-5818-4e73-88aa-c0290a57694b	INFO	TypeError: Cannot destructure property 'metafield' of 'r.data.data.node' as it is null.
    at Runtime.he [as handler] (/var/task/src/functions/shopify-sync.js:20:80390)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
1:53:03 PM: Duration: 249.75 ms	Memory Usage: 73 MB	

Build settings in Netlify are:

Base directory: web
Build command: npm run build
Publish directory: web/public

Placed all my env variables in Netlify and under Netlify Functions I set my Functions directory to functions/

Tried some things but can’t figure it out yet.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DennisKraaijeveldcommented, Mar 15, 2021

I saw I made a stupid mistake, now everything was working… I forgot to give the API access to the products, damn… Thanks

0reactions
Hahlhcommented, Mar 15, 2021

Awesome! Glad you got the issue settled 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sanity Connect for Shopify
Sync data automatically: Automatically sync whenever you save products. Note: The sync will update the Shopify information for both published and draft ...
Read more >
Unable to sync Shopify products in Sanity, serverless ... - GitHub
I'm having some issues getting the Sanity product sync working. ... The demo products are not tied to any Shopify store or the...
Read more >
Sanity Connect - Drive remarkable commerce with structured ...
Sync Shopify data, including products, variants, and collections, in seconds. Build a custom content authoring tool that enables creative product expressions.
Read more >
HULL - Vercel
Shopify Integration Features · Automatically syncs products from Shopify into Sanity · Custom action to sync product cart thumbnails back to Shopify from...
Read more >
sanity-plugin-shopify-lookup v0.1.6 - npm.io
Check Sanity-plugin-shopify-lookup 0.1.6 package - Last release 0.1.6 with MIT ... not come up with an efficient way to keep both Sanity and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found