Node error encountered while trying to fetch existing projects in Sanity.io.
Welcome back! That's definitely a frustrating error to hit when you're trying to catch up on all the exciting changes. The good news is you're not alone - this getaddrinfo ENOTFOUND error is almost always a network/DNS resolution issue rather than a Node.js version problem.
Based on a similar case in the Sanity community, this was confirmed to be network-related and resolved once the network issues were sorted out. Here's what you can try:
1. Network & DNS troubleshooting
The error means your system can't resolve b1gzrsxl.api.sanity.io to an IP address. Try:
- Test DNS directly: Run
nslookup b1gzrsxl.api.sanity.ioorping b1gzrsxl.api.sanity.ioto see if your system can resolve the domain - Flush DNS cache:
- macOS:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder - Windows:
ipconfig /flushdns - Linux:
sudo systemd-resolve --flush-caches
- macOS:
- Switch networks: Try a different WiFi network or mobile hotspot
- Check VPN/proxy: Temporarily disable any VPN or check corporate proxy settings
- Firewall: Corporate firewalls sometimes block subdomain patterns like
*.api.sanity.io
2. Verify your project ID
Double-check that b1gzrsxl is still a valid project in your account at sanity.io/manage. The fact that you can log in successfully but then hit this error suggests auth works but the project-specific endpoint doesn't resolve.
3. Node.js version note
Since you've been away for 2 years, heads up that Sanity Studio v4 requires Node.js 20+. You mentioned trying v20 which is perfect - just verify you're actually running it with node --version.
4. Try the interactive approach Instead of passing all those flags, try:
npm create sanity@latestThis might handle the network requests differently during setup.
5. Check npm proxy settings If you're behind a corporate proxy:
npm config get proxy
npm config get https-proxySince the authentication works but project fetching fails, this really points to DNS/firewall issues with the subdomain pattern. Most people find switching networks or flushing DNS resolves it. Let us know if you're still stuck!
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.