remix-run/react-router · warning

The --no-typescript flag is deprecated and will be removed i

Error message

The --no-typescript flag is deprecated and will be removed in React Router v9.

What it means

run() parses a dedicated `no-typescript` boolean; when present it prints this deprecation warning and sets flags.typescript = false (JavaScript output for `create` and `reveal` commands). The flag is slated for removal in v9 — after that, `--no-typescript` will either error or be ignored. The equivalent non-deprecated spelling is the declared `typescript` boolean negated: `--typescript=false`.

Source

Thrown at packages/react-router-dev/cli/run.ts:201

    strictPort: getBooleanArg(values.strictPort),
    token: getStringArg(values.token),
    typescript: getBooleanArg(values.typescript),
    version: getBooleanArg(values.version),
    watch: getBooleanArg(values.watch),
  };

  if (flags.help) {
    console.log(helpText);
    return;
  }
  if (flags.version) {
    console.log(packageJson.version);
    return;
  }

  flags.interactive = flags.interactive ?? isMain;
  if (values["no-typescript"]) {
    console.warn(
      colors.yellow(
        "The --no-typescript flag is deprecated and will be removed in React Router v9.",
      ),
    );
    flags.typescript = false;
  }

  let command = input[0];

  // Note: Keep each case in this switch statement small.
  switch (command) {
    case "routes":
      await commands.routes(input[1], flags);
      break;
    case "build":
      await commands.build(input[1], flags);
      break;
    case "reveal": {

View on GitHub (pinned to 6beaca3952)

Solutions

  1. Replace `--no-typescript` with `--typescript=false` in every script/command that passes it
  2. Or drop the flag entirely and accept the default TypeScript output, converting files manually if needed
  3. Sweep package.json scripts, CI YAML, and READMEs for `--no-typescript` now so the v9 removal doesn't break builds

Example fix

# before
"create:app": "react-router create my-app --no-typescript"

# after
"create:app": "react-router create my-app --typescript=false"
Defensive patterns

Strategy: validation

Validate before calling

// scan scripts for the deprecated flag before running
import fs from "node:fs";
let pkg = JSON.parse(fs.readFileSync("package.json", "utf8"));
let offenders = Object.entries(pkg.scripts ?? {}).filter(([, cmd]) => cmd.includes("--no-typescript"));
if (offenders.length) {
  throw new Error(`Replace --no-typescript with --typescript=false in: ${offenders.map(([k]) => k).join(", ")}`);
}

Prevention

When it happens

Trigger: Invoking `react-router create <dir> --no-typescript` or `react-router reveal entry.client --no-typescript` (or `entry.server`) — any argv containing the `--no-typescript` token.

Common situations: npm scripts, docs, and scaffolding templates written against v6/v7 CLI that generated plain-JS apps; CI jobs that reveal entries as JS.

Related errors


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