docs: fix Bun install command (#65016)
### 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 in7e16538485
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` in2ab4a443a2
, 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 ina42efae49d
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>
This commit is contained in:
parent
45e6b3e092
commit
4d4dc4b5f9
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ pnpm create next-app
|
|||
```
|
||||
|
||||
```bash filename="Terminal"
|
||||
bunx create next-app
|
||||
bun create next-app
|
||||
```
|
||||
|
||||
You will then be asked the following prompts:
|
||||
|
|
Loading…
Reference in a new issue