“找不到命令:create-next-app"如何创建下一个应用程序? [英] "command not found: create-next-app" how do I create a next application?

查看:24
本文介绍了“找不到命令:create-next-app"如何创建下一个应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Next.js 的新手,我正在使用这个命令来创建我的应用程序:

I am new to Next.js I am using this command to create my app:

npx create-next-app

但它给出的错误是:

错误:EPERM:不允许操作,mkdir 'C:Usersdanyyal'找不到命令:create-next-app

Error: EPERM: operation not permitted, mkdir 'C:Usersdanyyal' command not found: create-next-app

如何创建应用程序?ps 我已经安装了nodejs.

how to create the app? p.s I have nodejs installed.

推荐答案

先全局安装create-next-app

npm i -g create-next-app

之后就可以使用create-next-app CLI 创建下一个应用了.

After you can use create-next-app CLI to create next app.

如果您想在当前目录中创建新的下一个应用程序,请执行

If you want to create new next app in current directory do

create-next-app .

对于命名的下一个应用程序,只需这样做

For a named next app just do

create-next-app your-app-name

这篇关于“找不到命令:create-next-app"如何创建下一个应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆