-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
Removed the "-" sign on Bun option for create-next-app CLI tool in the documentation #64972
Conversation
its just simple PR, because "bunx create-next-app" is incorrect command for bun
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
1 similar comment
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
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.
Thank you for submitting a
### What? Corrects the Bun install command (again) on [this page](https://nextjs.org/docs/app/api-reference/create-next-app#interactive) of the docs. ### Why? The Bun instructions were originally created in 7e16538 with a correct command to create a new Next.js project with Bun: `bunx create-next-app`. Then, it was changed to `bunx create next-app` in 2ab4a44, which isn't correct because `bunx` acts like `npx` and tries to run a nonexistent package called `create`, specifying `next-app` as its argument. This change was reverted in a42efae two weeks ago, and a PR from today (#64972) reverts that correction. Both `bunx create-next-app` and `bun create next-app` work on my machine as of Bun 1.0. `bunx create-next-app` is analogous to `npx create-next-app`, and `bun create next-app` is the same as `npm create next-app`. | Command | Correct? | Similar NPM command | Note | |---|---|---|---| | `bun create next-app` | ✅ | `npm create next-app` | My proposed change | | `bunx create-next-app` | ✅ | `npx create-next-app` | | | `bunx create next-app` | ❌ | `npx create next-app` (incorrect) | Currently listed in the Next.js docs | | `bun create-next-app` | ❌ | `npm create-next-app` (incorrect) | | I think this confusion is caused by having two valid ways to run `create-next-app` with two very similar syntaxes. **It could be beneficial to include a note explaining the two correct syntaxes** to avoid future confusion, but for now, I have just changed `bunx` -> `bun` to keep the command similar to `yarn` and `pnpm`. Co-authored-by: Sam Ko <sam@vercel.com>
Actually, This is to be expected, as they are supposed to be the bun equivalents of |
@abdoufma I don't quite understand what the issue is, and I've tried |
Thanks for the re-clarifications. It's likely a separate issue causing |
@samcx Agreed. A command supported by all package managers is prefered. |
Thanks for the explanation; now I understand. Sorry if I caused any confusion. I thought I could help by providing this PR, and the developers approved it. I just thought it could help everyone. I didn't expect there would be a debate about this. I'm not an expert in anything, and thanks for clarifying; now I get it. Thank you, developers, for reviewing this PR. |
@abdoufma I'm not seeing |
@samcx Admittedly, finding the relevant documentation wasn't easy at first, but And as per
|
In other words: |
What?
this is just small changes for this doc https://nextjs.org/docs/app/api-reference/create-next-app#interactive
Why?
because
bunx create-next-app
is incorrect command for bun, if you run that command it will given error like thisHow?
i just removed the "-" sign on bun option, so its must be like this