Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Launching a project with npm and Sanity, and resolving issues with loading and closing processes.

9 replies
Last updated: Oct 22, 2021
Good morning 👋 I’m a npm noob and think I’m launching my project the wrong way, I’ve been running
npm run dev
from the root directory of my project, but my Studio is stuck loading — any idea what I’m doing wrong?
Oct 22, 2021, 2:44 PM
This is what’s in my console
Oct 22, 2021, 2:45 PM
Did you cd into
studio
? and then type in
sanity start
Oct 22, 2021, 3:07 PM
user D
sorry, I’m a Terminal noob too 😬
Oct 22, 2021, 3:22 PM
user J
Seems like you don’t have the cli tools installed on this machine, maybe have a look at the first step in https://www.sanity.io/docs/getting-started to see if getting those installed will help?
Oct 22, 2021, 3:28 PM
user M
this did it, thank you so much!
Oct 22, 2021, 3:41 PM
Is the general process1. running
npm dev run
in the root folder, then2. running
sanity start
in the studio folder?or is there a different way I should be going about launching the project?

Also, how do I close everything? I usually just close the Terminal window but that feels like probably not the right thing to do
😬
Oct 22, 2021, 3:44 PM
Also I seem to have generated two blank files called
sanity
and
npm
which is probably a mistake on my part? 😆 Or are those important?
Oct 22, 2021, 3:49 PM
you can hit
ctrl-c
to stop the processes you start, but the effect will often be the same with closing the terminal.
I don’t know if you need to run
npm dev run
, it depends on what is in your
package.json
in that folder 🙂 It could be that it starts your frontend application?
the blank files sound like a mistake, yes
🙂 Again, its hard to tell you “you can delete them” from here, as I know nothing of what your application is or does, but you could for instance try to move them to a different folder, or rename them, and see if everything still works before deleting them. (Or if you use
git
for version control, you can ensure you have them in a commit you can roll back to if it ends up breaking something if they are deleted)
Oct 22, 2021, 4:44 PM
Also,
user J
, in your particular setup, if you run
npm run dev
in your
/web
directory, it'll start your 11ty frontend. If you run
sanity start
in your
/studio
directory, it'll start your Sanity Studio.
Oct 22, 2021, 5:07 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?