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

Bun Create seems broken #4507

Closed
willisplummer opened this issue Sep 5, 2023 · 8 comments
Closed

Bun Create seems broken #4507

willisplummer opened this issue Sep 5, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@willisplummer
Copy link

What version of Bun is running?

0.8.1+16b4bf341acc0f4804f0b6bdf5298c180cd00366

What platform is your computer?

Darwin 22.3.0 arm64 arm

What steps can reproduce the bug?

I just followed elysia getting started:

curl https://bun.sh/install | bash
bun create elysia hi-elysia

What is the expected behavior?

I'd expect bun create with no other input to show me something like..

image

And with elysia template I thought it would create a dir and do all the installs

What do you see instead?

> bun create
Fetching manifest... ^C
> bun create
Fetching manifest...
^C
> bun create elysia ./elysia-test
Fetching package.json...

error: ConnectionRefused

----- bun meta -----
Bun v0.8.1 (16b4bf34) macOS Silicon 22.3.0
CreateCommand:
Elapsed: 75018ms | User: 7ms | Sys: 10ms
RSS: 6.60MB | Peak: 6.60MB | Commit: 34.62MB | Faults: 39
----- bun meta -----

0   0x104bfcf24 WTFGetBacktrace

Crash report saved to:
  ~/.bun/.bun-crash/v0.8.1-1693928415333.crash

Search GitHub issues https://bun.sh/issues or ask for #help in https://bun.sh/discord

Additional information

No response

@willisplummer willisplummer added the bug Something isn't working label Sep 5, 2023
@birkskyum
Copy link
Collaborator

birkskyum commented Sep 5, 2023

bun create is not like npm create:

You can use bun x create-elysia hi-elysia to do what you want for now.

@birkskyum
Copy link
Collaborator

birkskyum commented Sep 5, 2023

If this examples folder deserves a reserved keyword, maybe it could be bun example or bun generate instead, so that bun create can be compatible with npm create?

@birkskyum
Copy link
Collaborator

closed

@paperclover
Copy link
Member

paperclover commented Sep 7, 2023

this might still be a bug in bun if it doesnt handle connection refused here properly. probably should keep open in case.

not sure, but will take a look at this in a few days after 1.0

(elysia still uses old bun create code)

@willisplummer
Copy link
Author

willisplummer commented Sep 9, 2023

I'm not sure I follow, but I think it's probably worth trying to preserve the bun create react syntax as it's already all over the internet if you search how to create a react project in bun.

e.g.

https://dev.to/ashirbadgudu/create-a-react-app-with-bun-125o

the internal documentation also appears to suggest this is how it works:

https://bun.sh/docs/templates#from-npm

edit: I think issue #4561 more accurately describes what I'm running into -- bun install on an existing project is also so slow that it looks like it's stalled out. Feel free to close this!

edit2: I tried with 1.0 and I'm getting the same behavior

@colinhacks
Copy link
Contributor

colinhacks commented Sep 14, 2023

Apologies for the confusion

TLDR: bun create react is not longer a valid command. We recommend using bun create vite or bun create react-app instead.

Previously, bun create used an internal list of sample projects that we maintained. We've since switched it to match npm and others, so bun create <template> equivalent to running bunx create-<template>. Since there's no create-react package on npm, the command fails.

If you run npm create react or yarn create react you'll see the same error.

No longer valid

$ bun create react

Use this instead

$ bun create vite
$ bun create react-app

@Miguelburitica
Copy link

I am currently running the latest version of Bun, which is 1.0.2, but I still encounter the same problem. The issue on GitHub is closed, but I cannot find a clear solution. Is this issue supposed to be fixed in future versions of Bun?

image

I am in Manjaro latest version.

TheKnarf added a commit to TheKnarf/documentation that referenced this issue Nov 8, 2023
`Bun create` does not work, `bun x create-elysia` is the correct command.

See this issue for more context: oven-sh/bun#4507
@tomholford
Copy link

Here's an example using wagmi's installation instructions:

bun

bun create wagmi
error: could not determine executable to run for package create-wagmi

bunx

bunx create-wagmi                                                                                                                                                                                       
error: could not determine executable to run for package create-wagmi

npm

npm create wagmi@latest                                                                                                                                                                                 
? Project name: › wagmi-project

versions
bun 1.0.36
macOS 14.4.1 on M2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants