Skip to content

feat(create-next-app): detect non-interactive environments and fail fast#91171

Open
nikp29 wants to merge 1 commit into
vercel:canaryfrom
nikp29:feat/create-next-app-non-interactive
Open

feat(create-next-app): detect non-interactive environments and fail fast#91171
nikp29 wants to merge 1 commit into
vercel:canaryfrom
nikp29:feat/create-next-app-non-interactive

Conversation

@nikp29
Copy link
Copy Markdown

@nikp29 nikp29 commented Mar 10, 2026

What

Detects when create-next-app runs in non-interactive environments and fails with a helpful error instead of hanging.

Why

Currently hangs in CI/CD, Docker, and AI tools (Claude Code, Cursor, Copilot) waiting for input.

How

  • Check !process.stdin.isTTY before prompts
  • Show error with --yes flag example
  • Standard pattern (same as npm/yarn/pnpm)

Testing

Tested in Claude Code (no TTY) - shows error correctly. Interactive terminals unaffected.

Closes

#91169

@nextjs-bot nextjs-bot added the create-next-app Related to our CLI tool for quickly starting a new Next.js application. label Mar 10, 2026
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 10, 2026

@nikp29 is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@nextjs-bot
Copy link
Copy Markdown
Contributor

nextjs-bot commented Mar 10, 2026

Allow CI Workflow Run

  • approve CI run for commit: fe79642

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@nikp29 nikp29 force-pushed the feat/create-next-app-non-interactive branch from e4fba01 to fe79642 Compare March 10, 2026 21:55
@nikp29
Copy link
Copy Markdown
Author

nikp29 commented Mar 16, 2026

@nextjs-bot can i get an approval

@nikhil-patel-whatnot
Copy link
Copy Markdown

@timneutkens mind letting ci run for this

- Add TTY detection before showing prompts
- Show helpful error with --yes flag example
- Works for CI/CD, Docker, AI tools
- Self-teaching error messages
- Zero breaking changes
@nikp29 nikp29 force-pushed the feat/create-next-app-non-interactive branch from fe79642 to c940826 Compare May 25, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

create-next-app Related to our CLI tool for quickly starting a new Next.js application.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants