Sanity "digital envelope routines::unsupported" error on M1 Mac

6 replies
Last updated: Nov 29, 2025
has anyone else used Sanity on an M1 MBP yet? I'm hitting some errors and trying to figure out if it's related to the M1 or something else
sanity start
✔ Checking configuration files...
⠸ Compiling...webpack built d70252c1ea55521fce28 in 5521ms
✔ Compiling...
Failed to compile.

Error in ./dashboardConfig.js (part:@sanity/dashboard/config)
Module build failed: Error: error:0308010C:digital envelope routines::unsupported
    at Generator.next (<anonymous>)
    at new Promise (<anonymous>)
 @ ./node_modules/@sanity/dashboard/lib/legacyParts.js 45:37-78
 @ ./node_modules/@sanity/dashboard/lib/containers/Dashboard.js
 @ ./node_modules/@sanity/dashboard/lib/DashboardTool.js
 @ ./node_modules/@sanity/dashboard/lib/DashboardTool.js (all:part:@sanity/base/tool)
 @ ./node_modules/@sanity/default-layout/lib/router.js
 @ ./node_modules/@sanity/default-layout/lib/Root.js (part:@sanity/base/root)
 @ ./node_modules/@sanity/base/lib/components/SanityRoot.js (part:@sanity/base/sanity-root)
 @ ./node_modules/@sanity/server/lib/browser/entry-dev.js
 @ multi ./node_modules/@sanity/server/lib/browser/entry-dev.js

Error in ./schemas/schema.js (part:@sanity/base/schema)
Module build failed: Error: error:0308010C:digital envelope routines::unsupported
    at Generator.next (<anonymous>)
    at new Promise (<anonymous>)
 @ ./node_modules/@sanity/default-layout/lib/util/getNewDocumentModalActions.js 8:37-72
 @ ./node_modules/@sanity/default-layout/lib/constants.js
 @ ./node_modules/@sanity/default-layout/lib/defaultLayout/DefaultLayout.js
 @ ./node_modules/@sanity/default-layout/lib/defaultLayout/index.js
 @ ./node_modules/@sanity/default-layout/lib/Root.js (part:@sanity/base/root)
 @ ./node_modules/@sanity/base/lib/components/SanityRoot.js (part:@sanity/base/sanity-root)
 @ ./node_modules/@sanity/server/lib/browser/entry-dev.js
 @ multi ./node_modules/@sanity/server/lib/browser/entry-dev.js

Error in ./components/logo.js (part:@sanity/base/brand-logo)
Module build failed: Error: error:0308010C:digital envelope routines::unsupported
    at Generator.next (<anonymous>)
    at new Promise (<anonymous>)
 @ ./node_modules/@sanity/default-login/lib/legacyParts.js 43:40-80
 @ ./node_modules/@sanity/default-login/lib/LoginWrapper.js (part:@sanity/base/login-wrapper)
 @ ./node_modules/@sanity/default-layout/lib/Root.js (part:@sanity/base/root)
 @ ./node_modules/@sanity/base/lib/components/SanityRoot.js (part:@sanity/base/sanity-root)
 @ ./node_modules/@sanity/server/lib/browser/entry-dev.js
 @ multi ./node_modules/@sanity/server/lib/browser/entry-dev.js
AI Update

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 16

This 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 start

This 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+.

Show original thread
6 replies

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.

Was this answer helpful?