如何直接在当前文件夹中创建 next.js 应用程序

mxc*_*cdh 8 typescript reactjs next.js

如何在当前文件夹中创建下一个应用程序?

我试过:

npx create-next-app@latest .  --ts --use-npm
Run Code Online (Sandbox Code Playgroud)

但我收到错误:

Could not create a project called "folderName" because of npm naming restrictions:
 * name can no longer contain capital letters
Run Code Online (Sandbox Code Playgroud)

Ami*_*min 14

如果你使用的是 linux 或 mac 试试这个

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

它在 linux 和 mac 上都适用于我