Skip to content

fix: drop Nitro from public React Start examples - #1414

Merged
AlemTuzlak merged 1 commit into
mainfrom
fix/drop-nitro-from-examples
Sep 17, 2026
Merged

AlemTuzlak merged 1 commit into
mainfrom
fix/drop-nitro-from-examples

Conversation

@AlemTuzlak

@AlemTuzlak AlemTuzlak commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

The website sandbox fails with Vite environment "nitro" is unavailable. Working Start docs sandboxes do not use Nitro.

start-counter and start-streaming-data-from-server-functions run tanstackStart() and viteReact() only. Nitro is optional hosting, not required for vite dev or API routes.

This PR removes Nitro from Basic Chat, Generate Image, Streaming Structured Table, and the Nx React app template.

🎯 Changes

Public React tutorial apps now match the working Start examples. tanstackStart() serves /api/chat.

No docs page change. Tutorials never named Nitro. No changeset.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I fully understand the code in this pull request, including any code generated with AI assistance.
  • Docs: I updated docs/ for this change, or this change is not user-facing.
  • Changeset: I added a changeset (pnpm changeset), or this PR does not change a published package.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Testing

Commands run:

  1. vitest run tools/workspace-plugin/src/generators/react-app/generator.spec.ts passed.
  2. pnpm --filter basic-chat test:types passed.
  3. vite on Basic Chat without Nitro: GET / returned 200. POST /api/chat returned 400 Invalid AG-UI request body (the API route ran). No nitro is unavailable error.

pnpm run test:pr was not run.

Manual test after this merges and the site fetches main:

  1. Open https://tanstack.com/ai/latest/docs/framework/react/examples/basic-chat
  2. Wait for Vite to start.
  3. Confirm the chat UI loads.
  4. Confirm there is no Vite environment "nitro" is unavailable error.

Risk / rollback

Local and sandbox Start now use the Vite plugin only. Revert this PR to put Nitro back.

Summary by CodeRabbit

  • Chores
    • Removed Nitro integration from React examples and newly generated React applications.
    • React projects now rely on the TanStack Start runtime configuration.
  • Tests
    • Added coverage confirming generated applications no longer include Nitro dependencies or configuration.

@nx-cloud

nx-cloud Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 8e20557

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 22s View ↗
nx run-many --targets=build --exclude=examples/... ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2026-09-17 18:23:17 UTC

@AlemTuzlak
AlemTuzlak merged commit 682e0d7 into main Sep 17, 2026
8 of 9 checks passed
@AlemTuzlak
AlemTuzlak deleted the fix/drop-nitro-from-examples branch September 17, 2026 18:23
@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: d919a231-b7a4-40da-ac33-6a3350de246f

📥 Commits

Reviewing files that changed from the base of the PR and between 28fe4df and 8e20557.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • examples/react/basic-chat/package.json
  • examples/react/basic-chat/vite.config.ts
  • examples/react/generate-image/package.json
  • examples/react/generate-image/vite.config.ts
  • examples/react/streaming-structured-table/package.json
  • examples/react/streaming-structured-table/vite.config.ts
  • tools/workspace-plugin/src/generators/react-app/files/package.json
  • tools/workspace-plugin/src/generators/react-app/files/vite.config.ts__tmpl__
  • tools/workspace-plugin/src/generators/react-app/generator.spec.ts

📝 Walkthrough

Walkthrough

The change removes Nitro dependencies and Vite plugin configuration from three React examples and the React app generator template. Generator tests now verify that generated projects do not include Nitro references.

Changes

Nitro integration removal

Layer / File(s) Summary
Remove Nitro from React examples
examples/react/basic-chat/*, examples/react/generate-image/*, examples/react/streaming-structured-table/*
The examples no longer declare Nitro or register its Vite plugin. Their Vite plugin arrays retain Tailwind CSS, TanStack Start, and React plugins.
Update the React app generator
tools/workspace-plugin/src/generators/react-app/files/*, tools/workspace-plugin/src/generators/react-app/generator.spec.ts
The generated package and Vite configuration no longer include Nitro. Generator tests verify both removals.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant