[bug]: Something went wrong creating a new Next.js project. Please try again.
Describe the bug
I've copied this initiation command line from the documentation:
bunx --bun shadcn@latest init
I got this error after the project name question:
Something went wrong creating a new Next.js project. Please try again.
Affected component/components
Project Setup
How to reproduce
I interrupted the init command the first time, and then I continuously got the error.
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Macbook pro 2021 M1
Before submitting
- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Worked with me with this command
bun x shadcn@latest init
Can anyone explain why?
Worked with me with this command
bun x shadcn@latest initCan anyone explain why?
bun x shadcn@latest init
This works, but there is no “bun” related file in the next.js project folder?
Same issue, seemingly out of the blue was working fine two days ago
Choose Deafault project name that is my app
Describe the bug
I've copied this initiation command line from the documentation:
bunx --bun shadcn@latest initI got this error after the project name question:Something went wrong creating a new Next.js project. Please try again.Affected component/components
Project Setup
How to reproduce
I interrupted the init command the first time, and then I continuously got the error.
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Macbook pro 2021 M1Before submitting
- [x] I've made research efforts and searched the documentation
- [x] I've searched for existing issues
Dont write the name project with capital letters.
Easy fix! Type npx clear-npx-cache and try again.
Choose Deafault project name that is my app
This worked for me. Thank you !
Most of these solutions don't seem to work except the original, use the bun x command rather than the bunx alias.
When I installed bun via brew, I encountered this error. After uninstalling it with brew and installing it via curl, the issue was resolved.
bun x shadcn@latest init ONLY USE LOWER CASE characters and - !!
Dont write the name project with capital letters.
worked for me
project next can't be uppercase name folder
I hit this error with the above as well. If I removed the --bun flag it works just fine:
bunx shadcn@latest init
i tested multiple times, following with @ilamAbi and @wildnhl solutions:
- Lowercase only: My-App becomes my-app.
- No spaces: Use hyphens (-) instead (e.g., my-new-project).
- Allowed characters: Only letters, numbers, hyphens (-), and underscores (_).
- Invalid start: Cannot begin with a dot (.) or an underscore (_).
for me removing --bun worked and anything else didn't
Easy fix! Type
npx clear-npx-cacheand try again.
It's right, because you tried capital letters before it.
You cannot use ./ as your file name. This is also one of the reasons for this error.