
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeBased on the community discussion you've linked to, this error typically occurs due to a version compatibility issue between @sanity/client and your Sanity Studio version.
The Problem:
You're using @sanity/client v5.2.2 with @sanity/core v2.35.6 (which indicates you're on Sanity Studio v2). The issue is that @sanity/client v5+ no longer supports ES5, which can cause problems when working with a v2 Studio.
The Solution:
You have two options:
Option 1: Downgrade to @sanity/client v4 (Quick Fix)
node_modules folder and lock filepackage.json and change the dependency to:"@sanity/client": "^4"npm install (or yarn)Option 2: Upgrade to Sanity Studio v3 (Recommended)
This is the better long-term solution. Sanity Studio v3 is the current version and works seamlessly with @sanity/client v5+. You can follow the migration guide to upgrade your Studio.
Additional Notes:
import { createClient } from '@sanity/client'import {createClient, type ClientConfig}, you can use separate imports instead:import { createClient } from '@sanity/client'
import type { ClientConfig } from '@sanity/client'apiVersion to a more recent date (like '2024-01-01' or the current date in YYYY-MM-DD format)The community members who helped solve this were able to identify the version mismatch as the root cause, and upgrading to Studio v3 resolved the issue completely.
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.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store