Discussion of errors when running Sanity start command
24 replies
Last updated: Jul 6, 2021
M
Hey guys! When I run
sanity startit keeps throwing me this error. Where am I doing wrong?
Jul 5, 2021, 10:29 AM
S
Whenever I get some error with sanity/base, I run sanity install and try again. Please try that and see if it works
Jul 5, 2021, 10:45 AM
M
Ahh I see, It kinda worked but it omitted an other error
sanity start events.js:353 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE: address already in use 127.0.0.1:3333 at Server.setupListenHandle [as _listen2] (net.js:1318:16) at listenInCluster (net.js:1366:12) at GetAddrInfoReqWrap.doListen (net.js:1503:7) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:8) Emitted 'error' event on Server instance at: at emitErrorNT (net.js:1345:8) at processTicksAndRejections (internal/process/task_queues.js:82:21) { code: 'EADDRINUSE', errno: -48, syscall: 'listen', address: '127.0.0.1', port: 3333 }
Jul 5, 2021, 10:57 AM
S
Because you have another instance of Sanity studio running. Please close that, and run this once again. Hope that helps. Happy coding
Jul 5, 2021, 10:58 AM
M
Yeah fair enough. When I terminated the other one and when I run sanity start again it threw the same sanity/base error again now. I'm kinda breaking my head here. Just going in circles and circles smh -_-. I appreciate you helping me tho.
Jul 5, 2021, 11:03 AM
S
It seems like the errors are in your node_modules folder. Please try npm install as well (you can delete node_modules before installation if you'd like)
Jul 5, 2021, 11:08 AM
M
Yeah I did deleted node_modules and tried
npm install.And then I ran sanity start in the sanity dierectory, still throwing me the same error
Jul 5, 2021, 11:15 AM
M
Yeah It's throwing
@sanity/baseerror
user P
Jul 5, 2021, 2:50 PM
This is usually resolved with removing node_modules and running
npm installagain
Jul 5, 2021, 2:51 PM
M
Tried removing node_modules as well
Jul 5, 2021, 2:52 PM
M
Still it's doens't work
Jul 5, 2021, 2:53 PM
M
I just don't understand what the complication is here
Jul 5, 2021, 2:53 PM
M
v14.17.0
Jul 5, 2021, 2:54 PM
M
Perhaps it is
Jul 5, 2021, 3:07 PM
M
Hi
user M
, I got rid of the files and tried npm installand
sanity install. It kept throwing me the same error i.e
sanity/base
Jul 5, 2021, 6:59 PM
P
Could you share the dependencies in your studio root folder's
package.json? So not the
blog-webone.
Jul 5, 2021, 7:04 PM
M
There you go
Jul 5, 2021, 7:09 PM
M
I got it worked certainly !I was kind of skeptical about it, but it surprised me! When I got rid of
Anyways I appreciate you guys helping me patiently!
node_modules,
package-lock.json&
yarn.lockthen for some reason my node was uninstalled from my mac. So I had to install Node using
brew install nodein my terminal. And then I tried
npm installin my project directory.And I also had to run the command ``npm install -g @sanity/cli` followed by commands
sanity install&
sanity startand it worked.I believe it was some kind of complication with Node. I don't know for sure tho just assuming.
Anyways I appreciate you guys helping me patiently!
user A
user M
user A
Jul 6, 2021, 4:36 AM
S
user T
I just faced similar issue, and I tried all the node related stuff. Actually the was caused by one of Sanity plugins. I had to reinstall the plugin and restart the server to get it working.Jul 6, 2021, 4:39 AM
G
Happy to hear it!
Jul 6, 2021, 4:45 AM
M
user G
May be you're not wrong .Anyways Happy coding : )Jul 6, 2021, 5:23 AM
Sanity– build remarkable experiences at scale
The Sanity Composable Content Cloud is the headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.