-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
CLI: Fix Nextjs project creation in empty directories #32828
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify the
--no-react-compilerflag and provide context for the change.The addition of
--no-react-compilerto all Next.js project creation commands needs verification:Flag validity: Confirm that
--no-react-compileris a supported flag increate-next-app. The React Compiler feature may have specific version requirements or may not be available in all Next.js versions.Missing context: The PR description is empty, providing no explanation for why this change is necessary. The PR title mentions "Fix Nextjs project creation in empty directories" and the branch name suggests it addresses a "hanging" issue, but there's no description of:
Behavior change: This modifies the default behavior of Next.js scaffolding. Users will now have projects created without the React compiler by default. Consider documenting this change if it's intentional.
Testing: No tests were added or updated for this bug fix. Consider adding:
Run the following script to check the latest
create-next-appdocumentation and verify flag support:Additionally, verify the flag is correctly formatted by checking if it's being passed to
create-next-app:🏁 Script executed:
Length of output: 1178
🌐 Web query:
💡 Result:
Short answer: No — create-next-app does not provide a dedicated --no-react-compiler flag. The create-next-app CLI supports generic --no-* negation for listed defaults (e.g., --no-eslint, --no-ts) but there’s no --no-react-compiler option in the CLI reference. To opt out of the React Compiler, pick a template without it or disable the feature in your app’s next.config.js. [1][2][3]
Sources:
Remove the unsupported
--no-react-compilerflag from all Next.js create commands (lines 49, 51, 52).The
--no-react-compilerflag is not a supported option increate-next-app. Create-next-app only supports generic--no-*negation for listed defaults (e.g., --no-eslint, --no-ts), and there is no --no-react-compiler option in the CLI reference. To opt out of the React Compiler, you should pick a template without it or disable the feature in your app's next.config.js.The invalid flag will be passed to the CLI but ignored or cause an error, breaking the scaffolding process. Remove
--no-react-compilerfrom:🤖 Prompt for AI Agents