Skip to content

fix: Improve create-turbo connectivity check and offline error messages#12257

Merged
anthonyshew merged 1 commit intomainfrom
shew/issue-12250
Mar 12, 2026
Merged

fix: Improve create-turbo connectivity check and offline error messages#12257
anthonyshew merged 1 commit intomainfrom
shew/issue-12250

Conversation

@anthonyshew
Copy link
Copy Markdown
Contributor

@anthonyshew anthonyshew commented Mar 12, 2026

Summary

  • Check DNS against github.com instead of registry.yarnpkg.comcreate-turbo downloads templates from GitHub, not the Yarn registry. The CNAME chain for registry.yarnpkg.com can exceed the 5s DNS timeout on slower resolvers, causing false "offline" reports.
  • Return diagnostic reasons when the connectivity check fails so users can understand what went wrong (DNS timeout vs DNS error, proxy detection status).
  • Detect HTTPS_PROXY (uppercase) in addition to https_proxy.

Closes #12250

Improve error messaging.

When the check fails, users now see specific diagnostics:

>>> ERROR  You appear to be offline. Please check your network connection and try again.
>>> WARN   DNS lookup for "github.com" timed out after 5s
>>> WARN   No HTTPS proxy was detected as a fallback.

Check github.com instead of registry.yarnpkg.com since templates are
downloaded from GitHub. Return diagnostic reasons on failure so users
can understand why the check failed (DNS timeout vs error, proxy status).
Also detect HTTPS_PROXY (uppercase) environment variable.
@anthonyshew anthonyshew requested a review from a team as a code owner March 12, 2026 14:00
@anthonyshew anthonyshew requested review from tknickman and removed request for a team March 12, 2026 14:00
@turbo-orchestrator turbo-orchestrator Bot added the pkg: create-turbo Issues related to npx create-turbo label Mar 12, 2026
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
examples-basic-web Ready Ready Preview, Comment, Open in v0 Mar 12, 2026 2:01pm
examples-designsystem-docs Ready Ready Preview, Comment, Open in v0 Mar 12, 2026 2:01pm
examples-gatsby-web Ready Ready Preview, Comment, Open in v0 Mar 12, 2026 2:01pm
examples-kitchensink-blog Ready Ready Preview, Comment, Open in v0 Mar 12, 2026 2:01pm
examples-nonmonorepo Ready Ready Preview, Comment, Open in v0 Mar 12, 2026 2:01pm
examples-svelte-web Ready Ready Preview, Comment, Open in v0 Mar 12, 2026 2:01pm
examples-tailwind-web Ready Ready Preview, Comment, Open in v0 Mar 12, 2026 2:01pm
examples-vite-web Building Building Preview, Comment, Open in v0 Mar 12, 2026 2:01pm
turbo-site Ready Ready Preview, Comment, Open in v0 Mar 12, 2026 2:01pm
turborepo-agents Ready Ready Preview, Comment, Open in v0 Mar 12, 2026 2:01pm

@anthonyshew anthonyshew enabled auto-merge (squash) March 12, 2026 14:00
@anthonyshew anthonyshew merged commit 0298dac into main Mar 12, 2026
48 checks passed
@anthonyshew anthonyshew deleted the shew/issue-12250 branch March 12, 2026 14:06
github-actions Bot added a commit that referenced this pull request Mar 12, 2026
## Release v2.8.17-canary.7

Versioned docs: https://v2-8-17-canary-7.turborepo.dev

### Changes

- ci: Add Node.js 24 to JS test matrices (#12256) (`12baf0d`)
- release(turborepo): 2.8.17-canary.6 (#12258) (`bcad89d`)
- fix: Improve create-turbo connectivity check and offline error
messages (#12257) (`0298dac`)

Co-authored-by: Turbobot <turbobot@vercel.com>
anthonyshew added a commit that referenced this pull request Mar 13, 2026
## Summary

Closes #12250

- Remove the `isOnline()` preflight connectivity check from
`create-turbo`
- Remove the `proxy-agent` dependency (only used by the removed check)

## Why

The `isOnline` check was [introduced in
#11297](#11297) with a 5-second
timeout. For users with slow routes to `github.com` (but otherwise
working internet), this causes a false "You appear to be offline" error
that blocks `create-turbo` entirely.

Two prior fixes
([#12257](#12257),
[#12277](#12277)) changed the
check target and method but kept the 5s timeout. The [reporter still
fails with
canary.14](#12250 (comment))
across all package managers.

The check is redundant. `createProject` already handles offline failures
through `retry({ retries: 3 })` and throws `DownloadError`, which
`handleErrors` catches with a clear message ("Unable to download
template from GitHub" + the specific error). There's no need for a
separate preflight gate.

## Testing

All existing `create-turbo` tests pass. The "throws correct error
message when a download error is encountered" test verifies the
`DownloadError` path works correctly without the preflight check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: create-turbo Issues related to npx create-turbo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create-turbo network issues after 2.4.0

1 participant