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

feat: Use executing package manager to install dependencies #1887

Closed
C0RR1T opened this issue May 11, 2024 · 4 comments
Closed

feat: Use executing package manager to install dependencies #1887

C0RR1T opened this issue May 11, 2024 · 4 comments
Labels
🌟 enhancement New feature or request

Comments

@C0RR1T
Copy link

C0RR1T commented May 11, 2024

Is your feature request related to a problem? Please describe.

When running the script with bun create t3-app@latest and then choosing to install the options results in npm installing the dependencies. This makes sense, because the CLI specifically asked if you want to npm install. It would be nice however to install the dependencies with the package manager you chose to run the script.

Describe the solution you'd like to see

When asking the user if they want to install the dependencies, display the correct install command for the package manager the script was started with (i.E. Bun --> "Should we run bun install to install dependencies" etc.). if the user chooses to install the dependencies via CLI, the CLI calls the correct command based on the executing package manager.

Describe alternate solutions

The CLI only asks the user if he wants to install the dependencies when npm is used. In other cases, the user has to manually install the dependencies

Additional information

Steps to reproduce the wrong package manager being used:

bun create t3-app@latest
What will your project be called --> test-project
Will you be using TS or JS -> TS
Would you like to use tRPC -> No
What auth provider would you like to use -> None
What DB ORM would you like to use -> Drizzle 
Would you like to use the app router -> Yes
What Database would you like to use -> Postgres
Initialize Git Repo -> Yes
Should we run `npm install` for you? -> Yes
@C0RR1T C0RR1T added the 🌟 enhancement New feature or request label May 11, 2024
@C0RR1T
Copy link
Author

C0RR1T commented May 11, 2024

I could try to implement this myself if this is actually something you guys think would be worth implementing

@juliusmarminge
Copy link
Member

juliusmarminge commented May 17, 2024

hmm it works with bunx:
CleanShot 2024-05-17 at 13 53 04

PRs accepted fixing bun create behavior, although it works for me so I suspect there might be some OS difference or something here...
CleanShot 2024-05-17 at 13 53 45

@C0RR1T
Copy link
Author

C0RR1T commented May 17, 2024

I noticed that bun doesn't pass the correct env variables when running bun create (see oven-sh/bun#11016)

@C0RR1T
Copy link
Author

C0RR1T commented May 17, 2024

I will close this issue since it's a problem with bun, not ct3a.

@C0RR1T C0RR1T closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants