Troubleshooting errors with Sanity on M1 MBP and Node version
Good news - this isn't actually an M1-specific issue! The error:0308010C:digital envelope routines::unsupported error is caused by Node.js 17's upgrade to OpenSSL 3, which broke compatibility with the version of webpack that Sanity Studio v2 uses.
Based on the GitHub issue discussion, here are your options:
Quick Fixes
Option 1: Downgrade to Node.js 16 (Recommended for Studio v2)
# If using nvm
nvm install 16
nvm use 16This is the cleanest solution and what most people in that thread confirmed works perfectly.
Option 2: Use the OpenSSL legacy provider
export NODE_OPTIONS=--openssl-legacy-provider
sanity startThis tells Node.js 17+ to use the legacy OpenSSL provider, working around the compatibility issue.
Long-term Solution
Upgrade to Sanity Studio v3 or v4: The newer versions switched to Vite instead of webpack, which completely resolves this issue. Note that Studio v4 requires Node.js 20 or higher.
Why This Happens
Node.js 17 introduced OpenSSL 3 which removed support for certain cryptographic algorithms that older versions of webpack relied on. This affects many projects using webpack 4, not just Sanity. Your M1 Mac is working fine - it's purely a Node.js version compatibility issue that would happen on any machine with Node 17+.
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.