Comments (4)
It's been months since I've had to add a product and now when I go to deploy, I am getting the following error on Vercel. Can someone remind me where I should start debugging this?
TypeError: Cannot destructure property 'options' of 'activeVariant' as it is undefined.
from hull.
Hey @robksawyer,
As explain inside the README.md:
Client Updates
Once you hand off to the client you'll want to give them the ability to generate builds when they make updates within the Sanity Studio. The easiest way to do this is through my Vercel Deploy plugin.
I'm not currently using this template, but it seems that @ndimatteo also developed a Sanity plugin that allows this.
Here is what I understand:
- The website uses Static Generation to be fast.
- The website uses something to get live product's quantity, so static pages shows the ‘Add to cart’ or ‘Sold out’ button.
- So if you don't trigger the deploy on Vercel, it's normal that you don't have any difference.
I can missunderstand something here, but I think it's the way this template works.
I hope it helps you.
All the best,
Benito
from hull.
you will need to trigger a bulld through the vercel serverless functions in order to revalidate the static pages, alternatively you can use the isg feature of next js to rebuild pages after some time. (basically cache page build for a certain amount of time and the bust cache, force a particular page to re-generate)
on many sanity projects I have done for clients the revalidate option has worked great, content editor makes a change and publishes, then the page will udpate when the validate timer expires for a given client, once they leave the page and come back or reload the page,
from hull.
hey there @robksawyer – I'm just doing some issue maintenance here. Going to close this one, but to reiterate what @Dujota mentioned already:
- Yes, by default, you will need to rebuild your site when new products are added in Shopify, or any changes are made in Sanity. This is the standard flow for Static Site Generation (SSG).
- You can automate this by using ISR, or page-level revalidation if you wish
from hull.
Related Issues (20)
- Sanity CLI v3 causes project to not work correctly HOT 1
- GBP Cart Subtotals
- Sanity not connecting to Storefront HOT 2
- Products not appearing in Sanity—how to bring them over? HOT 1
- Bundles created with the Shopify App (Summer 2023) can't be added to cart HOT 11
- Mobile Crashes When Interacting On Page HOT 6
- marketing starter upgrade packages HOT 1
- Client-side exception HOT 7
- unknown field found
- Sync seems inconsistent HOT 1
- Can't locate Sanity Starter HOT 1
- Not able to Import Shopify Products into sanity Studio
- Application error: a client-side exception has occurred (see the browser console for more information). HOT 2
- Issue cloning project from Vercel HOT 1
- TypeError: Cannot read properties of undefined (reading 'replace') HOT 2
- I got the same error after following the directions. I cloned the repository with git clonee and followed the instructions in the ReadMe.md file in the root. Localhost:3333 and localhost:3000 are running, I don't see any errors. HOT 2
- Tried deploying Hull from Vercel Interface. HOT 1
- Sanity Create Project is not working HOT 1
- @reach/rect error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hull.