👀 Our most exciting product launch yet 🚀 Join us May 8th for Sanity Connect

Troubleshooting errors with Sanity on M1 MBP and Node version

6 replies
Last updated: Dec 29, 2021
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
Dec 29, 2021, 4:12 PM
I’m using Sanity Studio on an M1 MBP with no issues so I imagine the problem is unrelated
Dec 29, 2021, 4:13 PM
Thanks for confirming the Studio's running for you on an M1,
user Q
🙂

user N
, what version of Node are you using? If it's v17 for example, you may want to try reverting to v16 (LTS) to see if that helps resolve the errors.
Dec 29, 2021, 4:40 PM
Same here, node 16 on M1 no issues, I also found this SO question with the same error message: https://stackoverflow.com/questions/69692842
Dec 29, 2021, 5:08 PM
another thought - how did you install Node.js, e.g. through Homebrew, NVM, direct download? and are you using the arm64 version, or x86 through Rosetta?
Dec 29, 2021, 5:10 PM
running v17.2, used Homebrew to install NVM and NVM to install node. The error went away after I did a
sanity upgrade
though. For some reason
@sanity/core
was at a lower version number than on my old machine 🤷
Dec 29, 2021, 5:58 PM
switching to node 16 did solve a similar issue running Gatsby for me
Dec 29, 2021, 5:59 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?