The Sanity engineering blog is live. Deep dives from our engineers.

Fix "upstream server is timing out" error when running npm create sanity@latest

8 repliesLast updated: Nov 29, 2025

Hi, I want to start build project in sanity with npm -y create sanity@latest, but after trying many times this error keeps appearing, how to fix this?

Error: The upstream server is timing out _at onResponse (C:/Users/ADMIN/AppData/Local/npm-cache/_npx/67a0730928194b24/node_modules/@sanity/cli/lib/_chunks/loadEnv-NFU3msTN.js
:1652:13)_ _at applyMiddleware (C
:/Users/ADMIN/AppData/Local/npm-cache/_npx/67a0730928194b24/node_modules/get-it/dist/index.cjs:53:13)_ _at onResponse (C
:/Users/ADMIN/AppData/Local/npm-cache/_npx/67a0730928194b24/node_modules/get-it/dist/index.cjs:118:22)_ _at C
:/Users/ADMIN/AppData/Local/npm-cache/_npx/67a0730928194b24/node_modules/get-it/dist/index.cjs:141:55_ _at callback (C
:/Users/ADMIN/AppData/Local/npm-cache/_npx/67a0730928194b24/node_modules/get-it/dist/index.cjs:521:46)_ _at C
:/Users/ADMIN/AppData/Local/npm-cache/_npx/67a0730928194b24/node_modules/get-it/dist/index.cjs:588:14_ _at DestroyableTransform.
anonymous (C:/Users/ADMIN/AppData/Local/npm-cache/_npx/67a0730928194b24/node_modules/get-it/dist/index.cjs:273:7)_
at Object.onceWrapper (node628:28)
at DestroyableTransform.emit (node526:35) _at endReadableNT (C
:/Users/ADMIN/AppData/Local/npm-cache/_npx/67a0730928194b24/node_modules/readable-stream/lib/_stream_readable.js:1010:12)_
AI Update

The "upstream server is timing out" error you're experiencing when running npm -y create sanity@latest is typically a network connectivity issue where the Sanity CLI can't reach Sanity's servers. Here are several approaches to fix this:

1. Check Your Node.js Version

First, verify you're using Node.js 20 or higher, as Sanity Studio v4 requires Node.js version 20+. Run:

node -v

If you're on an older version, upgrade to Node.js 20 or later.

2. Network and Firewall Issues

The timeout error suggests a network connectivity problem. Try these steps:

3. Clear npm Cache

Your npm cache might be corrupted. Clear it with:

npm cache clean --force

Then try creating your Sanity project again.

4. Enable Debug Mode

To get more detailed error information, enable debug logging. On Windows, use:

set DEBUG=sanity:*
npm -y create sanity@latest

Or for more detailed network information:

set SANITY_DEBUG=1
npm -y create sanity@latest

This will show you exactly where the timeout is occurring and might reveal the specific issue.

5. Try Alternative Installation Methods

If the issue persists, try:

6. Windows-Specific Considerations

Since you're on Windows (based on your error path), also try:

If none of these solutions work, the debug output should give you more specific information to share with Sanity support or the community for further assistance.

Show original thread
8 replies

Was this answer helpful?

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.

Related contributions