Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: initialise a new project with pages router without prompt #69304

Open
mishushakov opened this issue Aug 26, 2024 · 3 comments
Open

CLI: initialise a new project with pages router without prompt #69304

mishushakov opened this issue Aug 26, 2024 · 3 comments
Labels
bug Issue was opened via the bug report template. create-next-app Related to our CLI tool for quickly starting a new Next.js application.

Comments

@mishushakov
Copy link

Link to the code that reproduces this issue

https://github.com/mishushakov/create-next-issue

To Reproduce

Run:

npx create-next-app@latest . --ts --tailwind --no-eslint --import-alias "@/*" --use-npm --no-src-dir

Current vs. Expected behavior

Current:

Will ask me explicitly:

? Would you like to use App Router? (recommended) › No / Yes

Expected:

Proceeds to create an app using pages router, no questions asked

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 20.12.2
  npm: 10.5.0
  Yarn: 1.22.21
  pnpm: 8.15.4
Relevant Packages:
  next: 14.2.4 // There is a newer version (14.2.6) available, upgrade recommended! 
  eslint-config-next: 14.2.4
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.4
Next.js Config:
  output: N/A
 ⚠ There is a newer version (14.2.6) available, upgrade recommended! 
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue

Which area(s) are affected? (Select all that apply)

create-next-app

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

No response

@mishushakov mishushakov added the bug Issue was opened via the bug report template. label Aug 26, 2024
@github-actions github-actions bot added the create-next-app Related to our CLI tool for quickly starting a new Next.js application. label Aug 26, 2024
@caoimhebyrne
Copy link

Is the question you're asking related to the fact that there is no CLI option for the pages router, or the fact that it should default to it 🤔

@mishushakov
Copy link
Author

I expect it to default to pages router, yes

@caoimhebyrne
Copy link

Why should it default to the pages router..? App router is recommended these days, nothing you're supplying in the CLI arguments indicates that it should use the pages router by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. create-next-app Related to our CLI tool for quickly starting a new Next.js application.
Projects
None yet
Development

No branches or pull requests

2 participants