Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a next.js app directly in the current folder

How I can create next-app in the current folder?

I tried:

npx create-next-app@latest .  --ts --use-npm

But I get error:

Could not create a project called "folderName" because of npm naming restrictions:
 * name can no longer contain capital letters
like image 427
mxcdh Avatar asked Nov 26 '25 17:11

mxcdh


2 Answers

if you are using linux or mac try this

npx create-next-app@latest ./ --ts --use-npm

it is working for me on both linux and mac

like image 173
Amin Avatar answered Nov 28 '25 06:11

Amin


For Windows users use npx create-next-app@latest ./

Note: Your existing folder name can't contain any uppercase characters. Ex: BookStore can be ==> bookstore or book_store

like image 35
Moniruzzaman Sujon Avatar answered Nov 28 '25 08:11

Moniruzzaman Sujon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!