How AI is powering better personalization in e-commerce [with Vercel]. Sign up now

Error: No settings context found in hydrogen-sanity-demo setup

13 repliesLast updated: Nov 29, 2025

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?
AI Update

The "Error: No settings context found" happens because you haven't created a settings document in your Sanity dataset yet. This is actually a common issue when first setting up the hydrogen-sanity-demo!

The hydrogen-sanity-demo wraps the app in a <SettingsProvider> component that expects to fetch a settings document from your Sanity dataset. This document contains shared values like site title, navigation, and other global settings. When SettingsContext.server.jsx queries for *[_type == 'settings'] and finds nothing, it throws this error.

To fix this:

Once the settings document exists in your dataset, the error should disappear and your Hydrogen storefront will load properly.

The hydrogen-sanity-demo discussion on Sanity's community confirms this is the solution, and the maintainers noted they should make this error message more descriptive to help future users!

As a side note: if you're deploying this to production, the easiest path is via Docker (the demo team deploys to fly.io). Vercel requires some tweaking since Hydrogen uses Express, which is a bit of an anti-pattern for Vercel's serverless architecture.

Show original thread
13 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions