remix-run/react-router · error · CopyTemplateError

There was a problem fetching the file from GitHub. No asset…

Error message

There was a problem fetching the file from GitHub. No asset was found at that url. Please try again later.

What it means

The GitHub releases API call for a release-asset template returned 200, but the parsed JSON body did not contain an assets array (body missing, not an object, or assets absent/not an array). This is a defensive shape check against unexpected API responses and is almost never caused by user input.

Solutions

  1. Retry the command later
  2. Check for interfering proxies: curl -i the release URL and inspect the raw response
  3. If it reproduces consistently with a clean network, report it to the react-router repo
Defensive patterns

Strategy: retry

Try / catch

try {
  await createReactRouter(args);
} catch (e) {
  const msg = e instanceof Error ? e.message : String(e);
  if (/No asset was found at that url/.test(msg)) {
    // Shape errors from the GitHub API are almost always transient or proxy-related
    console.error("Unexpected GitHub API response — check proxies and retry");
    process.exit(1);
  }
  throw e;
}

Prevention

When it happens

Trigger: A proxy, firewall, or captive portal returning an error payload with HTTP 200; a GitHub API schema change or upstream incident producing an unexpected body.

Common situations: Corporate MITM proxies rewriting responses; rare GitHub API incidents; environment-specific interception of api.github.com.

Related errors


AI-assisted analysis of remix-run/react-router@6beaca3952 (2026-08-18). Data as JSON: /api/errors/6095592a0207cbf7. Report an issue: GitHub.

Appendix: source

Thrown at packages/create-react-router/copy-template.ts:244

        : `https://api.github.com/repos/${info.owner}/${info.name}/releases/tags/${info.tag}`;

    let response = await fetch(releaseUrl, { headers });

    if (response.status !== 200) {
      throw new CopyTemplateError(
        "There was a problem fetching the file from GitHub. The request " +
          `responded with a ${response.status} status. Please try again later.`,
      );
    }

    let body = (await response.json()) as { assets: GitHubApiReleaseAsset[] };
    if (
      !body ||
      typeof body !== "object" ||
      !body.assets ||
      !Array.isArray(body.assets)
    ) {
      throw new CopyTemplateError(
        "There was a problem fetching the file from GitHub. No asset was " +
          "found at that url. Please try again later.",
      );
    }

    let assetId = body.assets.find((asset) => {
      // If the release is "latest", the url won't match the download url
      return info.tag === "latest"
        ? asset?.browser_download_url?.includes(info.asset)
        : asset?.browser_download_url === tarballUrl;
    })?.id;
    if (assetId == null) {
      throw new CopyTemplateError(
        "There was a problem fetching the file from GitHub. No asset was " +
          "found at that url. Please try again later.",
      );
    }
    resourceUrl = `https://api.github.com/repos/${info.owner}/${info.name}/releases/assets/${assetId}`;

View on GitHub (pinned to 6beaca3952)