👀 Our most exciting product launch yet 🚀 Join us May 8th for Sanity Connect

Discussion about using Hydrogen-sanity-demo with Shopify, creating a settings document, deploying on Vercel, and potential use of TypeScript.

13 replies
Last updated: Nov 19, 2021
Hi guys. I’ve cloned the
hydrogen-sanity-demo
to give it a whirl and show the devs at my work.
I’ve added the Sanity app to my Shopify store, cloned the repo and plugged in the credentials in sanity.config and shopify.config. When I start up the app I get an
Error: No settings context found
error. I’m looking in
SettingsContext.server.jsx
now and nothing really stands out to me. Any ideas how to fix the issue?
Nov 19, 2021, 10:39 AM
I’ll setup the pre-configured studio and take another look
Nov 19, 2021, 10:42 AM
Hey
user L
– thanks for giving this a go!
I believe this issue may be happening because no
settings
document has yet been created in your sanity dataset. The app is wrapped in a
<SettingsProvider>
which receives some shared values (such as site title, navigation, etc)
Can you please confirm if that
settings
document has been created?
(And noted that this error message should definitely be more descriptive)
Nov 19, 2021, 10:42 AM
No it hasn’t. I went back and read the readme properly and realised that’s probably the issue 😂
Nov 19, 2021, 10:43 AM
Awesome! We’ll update this error message anyway, since it’s not the first time it’s popped up
Nov 19, 2021, 10:43 AM
Sweet, that would be helpful.
Nov 19, 2021, 10:44 AM
Also I can see the Shopify demo is not using Typescript. Do you know if Typescript is planned?
Nov 19, 2021, 10:45 AM
We’re going to try and keep in lock step with Hydrogen’s official starter as much as possible, which includes their current decision to be JS-first.
The idea being it’d be less cognitive overhead for users who have previously their their official starter.

Though there’s definitely
some discussion about going all in on TS which might be worth a follow
Nov 19, 2021, 10:58 AM
Nice
Nov 19, 2021, 11:21 AM
I have the Sanity starter setup properly now. It was really easy to configure. I really like how it has minimal Tailwind styling 👍
Nov 19, 2021, 11:22 AM
I’m trying to get my test Sanity app dpeloyed on Vercel. Do you guys know if there’s a custom deployment is required? Or if I can just use the default Vite config? Cannot see anything on Google about deploying to Vercel/Netlify
Nov 19, 2021, 12:53 PM
Hey
user L
, Hydrogen should run on Vercel, though as it uses express it may require some tweaking to get it to work. As Vercel’s documentation outlines, it’s a bit of an anti-pattern.
We’re in the process of getting this working with Cloudflare Workers (and eventually Shopify’s Oxygen, once general availability opens up). We’ll look to make this process a little smoother as Hydrogen develops, too.

For now, I think the easiest path to deploy is via Docker (we currently deploy with Docker to
fly.io ). Please do note that Hydrogen is still in developer preview!
Nov 19, 2021, 1:46 PM
Thanks for the info. Do you know if there’s an ETA on Oxygen? Seems like an interesting platform. for now I’ll just go with Docker I think
Nov 19, 2021, 1:50 PM
Your guess would be as a good as mine here!
Nov 19, 2021, 2:06 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?