Joint session with Vercel: How to build intelligent storefronts (May 15th)

Studio crashes on /studio/desk in production but works locally

3 repliesLast updated: Dec 1, 2025

When I access /studio/desk in the production environment, the page crashes. But when I access this path in the local development environment, it works fine. Has anyone encountered this issue before? My Node.js version is 16.20.0.
AI Update

The crash you're experiencing with /studio/desk in production is likely related to your Node.js version being below the minimum requirement. Your Node.js 16.20.0 is below what Sanity Studio needs to run properly.

Understanding the Node.js Version Issue

According to the official Sanity documentation, Sanity Studio v3 requires Node.js 18 or higher, and Studio v4 requires Node.js 20 or higher. Node.js 16 reached end-of-life, and modern tooling that Studio depends on (like Vite) requires Node 18+ to function properly.

Why It Works Locally But Not in Production

This is the key to your issue - the fact that it works locally but crashes in production suggests an environment mismatch:

About the "Workspace: missing context value" Error

The "Workspace: missing context value" error is a known issue that has appeared when embedding Studio into Next.js apps, particularly when there are version mismatches or build configuration issues. In that GitHub issue thread, users reported the same error with various Node versions, and it was often related to how the Studio was being bundled in production versus development.

How to Fix This

1. Upgrade your Node.js version in production:

For your production environment, you need to specify Node.js 18 or higher (20+ is recommended):

2. Verify your local Node version:

Run node -v in your terminal to confirm what version you're actually using locally. If it's 18+, that explains why local works but production doesn't.

3. Update your local development environment:

Even though it works locally now, you should upgrade to Node 20+ to match production and ensure consistency:

# If using nvm
nvm install 20
nvm use 20

4. Clear build caches and reinstall:

After upgrading Node, clean your dependencies:

rm -rf node_modules .next
npm install
npm run build

Once you've upgraded Node.js in your production environment to version 20 or higher and redeployed, the /studio/desk route should work consistently across both environments.

Show original thread
3 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