
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThis is a classic dependency installation issue! The errors show that Webpack can't find the @sanity/client and groq packages during your Vercel build, which means they're not installed in your project.
Here's how to fix it:
1. Install the missing packages locally:
npm install @sanity/client groqor if you're using yarn:
yarn add @sanity/client groq2. Verify your package.json:
After installing, make sure these packages appear in your package.json under "dependencies" (not "devDependencies"). They should look something like:
{
"dependencies": {
"@sanity/client": "^6.x.x",
"groq": "^3.x.x"
}
}3. Commit and push:
git add package.json package-lock.json
git commit -m "Add missing Sanity dependencies"
git pushWhy this happens:
This typically occurs when:
node_modules folder exists locally (so it works on your machine) but the packages aren't listed in package.json, so Vercel doesn't know to install themNote on versions:
If you're starting fresh, consider using the next-sanity package instead, which bundles the client and provides helpful Next.js-specific utilities. You can install it with:
npm install next-sanity @sanity/image-urlThis should resolve your Vercel deployment errors. The build will work once Vercel can properly install all your dependencies from package.json!
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