Installing Sanity on a Mac via Terminal - helpful tips and instructions
11 replies
Last updated: May 12, 2022
F
i need help please. giving up on sanity already.. ijust dont know why its so frustrating installing sanity on my mAC via the terminal
May 11, 2022, 10:48 PM
F
thank you. it returns EACCESS .. and when I add sudo to the begining, it asks for a password… i dont know what the password should be.
May 11, 2022, 11:24 PM
J
Really sorry this is frustrating. Managing node can be rough for even seasoned web developers.
Here’s a detailed
recent article on installing node with nvm (node version manager) on mac.
Here’s my own quick and dirty that may help you:
1. install
Homebrew (note: the xcode tools download can take a while if you haven’t done this yet on your mac)2. instead of installing node with brew…
3. install nvm with brew:
nvm instructions )5. check your node (
Here’s a detailed
recent article on installing node with nvm (node version manager) on mac.
Here’s my own quick and dirty that may help you:
1. install
Homebrew (note: the xcode tools download can take a while if you haven’t done this yet on your mac)2. instead of installing node with brew…
3. install nvm with brew:
brew install nvm4. install the latest node “lts” version (
nvm instructions )5. check your node (
node -v) and npm (
npm -v) versions. Both should return something. If so, you’re ready to install the cli6. now install the sanity cli globally:
npm install -g @sanity/cli7. check if the cli is installed:
sanity --helpshould return a list of options8. go ahead and log into the sanity cli:
sanity login- use your existing sanity account or create a new one if you haven’t yet9. NOW you should be good to go to create a new studio with
sanity initor install modules in an existing studio with
sanity installthen
sanity startto turn on your local dev server!
May 11, 2022, 11:28 PM
J
For more recent macOS versions, I do not think that you should need to run any of these commands with sudo and would avoid it unless the linked instructions say so.
May 11, 2022, 11:29 PM
J
running sudo with any of the brew, node, or npm module commands above might actually install things in a different directory than expected and cause unexpected results when you go to use the cli in your project
May 11, 2022, 11:30 PM
F
but I installed NODE already? downloaded it from the website and then installed it on my mac. Please Is there any additional installing process other than those I mentioned?
May 11, 2022, 11:42 PM
F
user M
thanks alot. I’ve got the password.May 11, 2022, 11:46 PM
J
If this works for you, you should be good to continue.
check your node (Here are some quick commands from my computer to make sure everything is installed:node -v) and npm (npm -v) versions. Both should return something
~ (✿◠‿◠)ノ node -v v18.0.0 ~ (✿◠‿◠)ノ npm -v 8.6.0 ~ (✿◠‿◠)ノ sanity -v @sanity/cli version 2.29.8 ~ (✿◠‿◠)ノ npm -g list /Users/jules/.nvm/versions/node/v18.0.0/lib ├── @sanity/cli@2.29.8 ├── corepack@0.10.0 ├── newman@5.3.2 └── npm@8.6.0
May 11, 2022, 11:47 PM
F
user M
Yes I was. ThanksMay 12, 2022, 12:26 AM
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.