vercel / vercel/next.js

CNA: add .github to allow list when checking if directory is empty

Open
#79,550 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

create-next-app
Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

Link to the code that reproduces this issue

https://github.com/chrisweb/reproduction_create-next-app_empty_directory

To Reproduce

when using CNA and there is a .github directory already present then CNA exists

Current vs. Expected behavior

have CNA ignore the .github directory because it is on the allow list of the "check if is empty" function

Provide environment information
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Home
  Available memory (MB): 32681
  Available CPU cores: 16
Binaries:
  Node: 22.13.0
  npm: 11.4.0
  Yarn: N/A
  pnpm: 9.15.3
Relevant Packages:
  next: 15.3.2 // Latest available version is detected (15.3.2).
  eslint-config-next: 15.3.2
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.8.3
Next.js Config:
  output: N/A
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

use case: after creating a new directory, you add a prompt template for github copilot into your .github/prompts directory, this prompt instructs github copilot to install next.js using a CNA command

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the create-next-app directory-empty check described in the issue and use the linked reproduction to confirm the behavior when .github already exists. Update the allow-list handling so that this directory does not make CNA exit, then rerun the reproduction to verify creation succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nextjs
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.