New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sanity start failed to compile #2880
Comments
Thanks for reporting, this seems to be caused by node 17 having upgraded to OpenSSL3, causing issues for ecosystem components like webpack. We'll be following this up in the coming days trying to find the best solution, but for now I'd recommend either using node 16 or running |
Going back to node 16 did the trick. Thanks! |
Any solution for this? I recently upgraded to 17, but this issue happened. |
I had the exact same issue. Using NVM, I switched to node v16.0.0 and it works perfectly now. Thanks! 😎 |
I am on node v16.3.1 and I get the above error. How do I run the |
In Sanity Studio v3 we've switched to a different bundler which fixes this issue - if you're still having issues with this in v2, try the aforementioned |
Describe the bug
I'm new to Sanity and have not been able to use
sanity start
to start using the service. The error messages are pasted below.To Reproduce
Steps to reproduce the behavior:
cd to directory
sanity start
Expected behavior
Sanity Studio to successfully compile.
Which versions of Sanity are you using?
@sanity/cli 2.21.5 (up to date)
@sanity/base 2.21.5 (up to date)
@sanity/core 2.21.5 (up to date)
@sanity/default-layout 2.21.5 (up to date)
@sanity/default-login 2.21.4 (up to date)
@sanity/desk-tool 2.21.5 (up to date)
@sanity/vision 2.21.5 (up to date)
What operating system are you using?
macOS Big Sur v11.5.2
Which versions of Node.js / npm are you running?
npm 8.1.0
node v17.0.0
Additional context
Here's the error during compile step:
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/vision/lib/SanityVision.js 12:37-73
@ ./node_modules/@sanity/vision/lib/VisionTool.js
@ ./node_modules/@sanity/vision/lib/VisionTool.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
I've deleted
node_modules
and reinstalled packages vianpm install
andsanity install
The text was updated successfully, but these errors were encountered: