{"record":{"id":"58b25698f4354e43","repo":"remix-run/react-router","slug":"the-no-typescript-flag-is-deprecated-and-will-be","errorCode":null,"errorMessage":"The --no-typescript flag is deprecated and will be removed in React Router v9.","messagePattern":"The --no-typescript flag is deprecated and will be removed in React Router v9\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/react-router-dev/cli/run.ts","lineNumber":201,"sourceCode":"    strictPort: getBooleanArg(values.strictPort),\n    token: getStringArg(values.token),\n    typescript: getBooleanArg(values.typescript),\n    version: getBooleanArg(values.version),\n    watch: getBooleanArg(values.watch),\n  };\n\n  if (flags.help) {\n    console.log(helpText);\n    return;\n  }\n  if (flags.version) {\n    console.log(packageJson.version);\n    return;\n  }\n\n  flags.interactive = flags.interactive ?? isMain;\n  if (values[\"no-typescript\"]) {\n    console.warn(\n      colors.yellow(\n        \"The --no-typescript flag is deprecated and will be removed in React Router v9.\",\n      ),\n    );\n    flags.typescript = false;\n  }\n\n  let command = input[0];\n\n  // Note: Keep each case in this switch statement small.\n  switch (command) {\n    case \"routes\":\n      await commands.routes(input[1], flags);\n      break;\n    case \"build\":\n      await commands.build(input[1], flags);\n      break;\n    case \"reveal\": {","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/remix-run/react-router/blob/6beaca39526d5716c3c112ebb0782765baa5a9ce/packages/react-router-dev/cli/run.ts#L183-L219","documentation":"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`.","triggerScenarios":"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.","commonSituations":"npm scripts, docs, and scaffolding templates written against v6/v7 CLI that generated plain-JS apps; CI jobs that reveal entries as JS.","solutions":["Replace `--no-typescript` with `--typescript=false` in every script/command that passes it","Or drop the flag entirely and accept the default TypeScript output, converting files manually if needed","Sweep package.json scripts, CI YAML, and READMEs for `--no-typescript` now so the v9 removal doesn't break builds"],"exampleFix":"# before\n\"create:app\": \"react-router create my-app --no-typescript\"\n\n# after\n\"create:app\": \"react-router create my-app --typescript=false\"","handlingStrategy":"validation","validationCode":"// scan scripts for the deprecated flag before running\nimport fs from \"node:fs\";\nlet pkg = JSON.parse(fs.readFileSync(\"package.json\", \"utf8\"));\nlet offenders = Object.entries(pkg.scripts ?? {}).filter(([, cmd]) => cmd.includes(\"--no-typescript\"));\nif (offenders.length) {\n  throw new Error(`Replace --no-typescript with --typescript=false in: ${offenders.map(([k]) => k).join(\", \")}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer the positively-declared boolean (`--typescript=false`) over ad-hoc negated flags","Codemod shared scripts/templates once per major upgrade","Watch CLI deprecation warnings in CI logs and fix them the release they appear, not when the flag is removed"],"tags":["cli","typescript","deprecation","scaffolding"],"backgroundTag":"deprecated-cli-flag","analyzedSha":"6beaca39526d5716c3c112ebb0782765baa5a9ce","analyzedAt":"2026-08-18T18:04:14.938Z","contentChangedAt":"2026-08-18T18:04:14.938Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}