Sanity installation issues on Mac via terminal

11 replies
Last updated: Jan 27, 2026
i need help please. giving up on sanity already.. ijust dont know why its so frustrating installing sanity on my mAC via the terminal
AI Update

Don't give up! Installing Sanity can be frustrating at first, but it's usually a quick fix once we identify the issue. Here's what you need to know to get past this:

The most common issue on Mac is Node.js version compatibility. Sanity Studio v4 requires Node.js version 20 or higher. If you have an older version installed, that's likely causing your installation problems.

Here's how to get up and running:

  1. Check your Node.js version - Open Terminal and run:

    node -v

    If it shows anything below v20 (like v16 or v18), you need to update.

  2. Install or update Node.js - Go to nodejs.org and download the LTS (Long Term Support) version, which will be v20 or higher. The installer will handle everything for you on Mac.

  3. Verify npm is working - After installing Node, check that npm (the package manager) is also available:

    npm -v
  4. Create your Sanity project - Once Node.js 20+ is installed, you have two options:

    Option A (Recommended) - Use the modern command:

    npm create sanity@latest

    Option B - Use the traditional CLI approach:

    npm install -g sanity@latest
    sanity init

    Both commands will walk you through creating a new project with prompts for project name, dataset configuration, and template selection. The sanity init command provides an interactive setup that handles everything for you.

Common Mac-specific issues:

  • Permission errors: If you see EACCES or permission errors when installing globally, don't use sudo with npm. Instead, you can use npm create sanity@latest which doesn't require global installation, or configure npm to install packages globally without requiring sudo.

  • Path issues: Make sure Terminal can find the node and npm commands. Close and reopen Terminal after installing Node.js to refresh your environment.

  • Multiple Node versions: If you've installed Node multiple times or used different methods, consider using a version manager like nvm to manage versions cleanly.

After successful installation, you can start your studio with:

npm run dev

What specific error message are you seeing in Terminal? That would help narrow down exactly what's going wrong. But in most cases, ensuring you have Node.js 20+ installed properly solves the issue immediately. You're almost there!

Show original thread
11 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?