Sanity Studio v4: A major version bump for a minor reason
Written by Knut Melvær
We're moving the sanity
package from v3 to v4. The only breaking change? We now require Node.js 20 instead of Node.js 18.
That's it. That's the post.
The boring details
Node.js 18 hit end-of-life in April 2024. Our dependencies are dropping support for it, which means we need to as well.
This ecosystem-wide shift includes tools like Vite 7, which now requires Node.js 20. While we haven't upgraded to Vite 7 yet, moving to Node.js 20 means we can bring you these improvements when we do: faster builds and reduced memory usage during development. Staying on Node.js 18 would lock us out of these developer experience improvements.
According to semantic versioning rules, dropping Node.js version support is technically a breaking change that requires a major version bump. Why? Because if you're on Node.js 18 and try to install the new version, it won't work. That's the textbook definition of "backward incompatible."
We could have bent the rules (we've done it before), but we decided it's time to align the sanity
package with how the rest of the npm ecosystem handles versioning. All our other packages already follow standard semver—sanity
has been the odd one out.
And for those of you who were here for it, this isn't like the v2 to v3 jump, where we completely reimagined how Sanity Studio worked. That was a true platform shift that took serious migration effort. That kind of migration effort taught us a lot about managing change (especially on how to not do it). This v4 bump is different—it's purely about Node.js compatibility.
What changes for you
Your code
Nothing. Your schemas, Studio customizations, and content work exactly as before.
Your Node.js version
Quick reminder: Sanity Studio is a single-page application that compiles to static files. Node.js is only required for development tooling and building—not for running Studio in the browser. Your users won't notice a thing.
If you're on Node.js 20 or higher, run npm update sanity@latest
when v4 ships on July 15th.
If you're still on Node.js 18, you'll need to upgrade. The good news? Node.js 20 brings native ES module support, better performance, and a built-in test runner.
To check if your dependencies are compatible with Node.js 20:
Internal server error