ui icon indicating copy to clipboard operation
ui copied to clipboard

[bug]: Something went wrong creating a new Next.js project. Please try again.

Open elhakeem opened this issue 1 year ago • 5 comments

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

elhakeem avatar Sep 07 '24 23:09 elhakeem

Worked with me with this command bun x shadcn@latest init Can anyone explain why?

elhakeem avatar Sep 07 '24 23:09 elhakeem

Worked with me with this command bun x shadcn@latest init Can anyone explain why?

bun x shadcn@latest init

This works, but there is no “bun” related file in the next.js project folder?

joseph0926 avatar Sep 08 '24 00:09 joseph0926

Same issue, seemingly out of the blue was working fine two days ago

weefunker avatar Sep 12 '24 08:09 weefunker

Choose Deafault project name that is my app

matinshaikh31 avatar Sep 19 '24 12:09 matinshaikh31

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

Dont write the name project with capital letters.

wildnhl avatar Sep 27 '24 13:09 wildnhl

Easy fix! Type npx clear-npx-cache and try again.

andrewrgarcia avatar Oct 19 '24 20:10 andrewrgarcia

Choose Deafault project name that is my app

This worked for me. Thank you !

daninaydenow avatar Nov 17 '24 20:11 daninaydenow

Most of these solutions don't seem to work except the original, use the bun x command rather than the bunx alias.

strafe avatar Dec 22 '24 20:12 strafe

When I installed bun via brew, I encountered this error. After uninstalling it with brew and installing it via curl, the issue was resolved.

hmzlvs avatar Jan 15 '25 21:01 hmzlvs

bun x shadcn@latest init ONLY USE LOWER CASE characters and - !!

ilamAbi avatar Feb 01 '25 08:02 ilamAbi

Dont write the name project with capital letters.

worked for me

karthickpalanivel avatar Jul 28 '25 02:07 karthickpalanivel

project next can't be uppercase name folder

eduardoddmg avatar Aug 23 '25 13:08 eduardoddmg

I hit this error with the above as well. If I removed the --bun flag it works just fine:

bunx shadcn@latest init

gordysc avatar Aug 23 '25 20:08 gordysc

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 (_).

CologneX avatar Aug 30 '25 21:08 CologneX

for me removing --bun worked and anything else didn't

prince882 avatar Sep 15 '25 12:09 prince882

Easy fix! Type npx clear-npx-cache and try again.

It's right, because you tried capital letters before it.

casiimir avatar Sep 24 '25 11:09 casiimir

You cannot use ./ as your file name. This is also one of the reasons for this error.

pollabd avatar Nov 19 '25 18:11 pollabd