create-next-app'不公认为内部或外部命令,可操作程序或批处理文件
我正在尝试使用 npx create-next-app nextjs-blog
安装下一个应用程序,但我不断收到此错误;
“create-next-app”未被识别为内部或外部命令, 可运行的程序或批处理文件。
我从周五开始就被困住了,还没有得到合适的解决方案,请帮忙。 我刚刚开始学习 next js Nd,我不确定为什么我会一遍又一遍地收到此错误。
我已经卸载并重新安装了我的节点,错误仍然存在
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我在 Windows 10 上的问题是由于某种原因我的环境变量(特别是路径用户变量)重复了许多变量,超出了最大 4096 限制,而没有告诉我。我手动删除了一堆重复项,然后保存它,没有达到最大限制错误。然后我刷新了环境变量,关闭了所有终端,然后 create-next-app 开始工作。
My issue on windows 10 was for some reason my environment variables, specifically the path user variable, had gotten many variables duplicated, exceeing the max 4096 limit without telling me. I manually deleted a bunch of duplicates and then saving it worked without the max limit reached error. I then refreshed my environment variables, closed all terminals, and then create-next-app worked.
首先安装这个:
然后:
First Install This:
Then:
来自 NextJs 文档:
From NextJs docs:
命令 :
参考:
command :
reference : https://nextjs.org/docs/api-reference/create-next-app
首先我们需要安装 npm i -g create-next-app。
在系统中添加路径变量。
C:\Users{用户名}\AppData\Roaming\npm
First we need to install npm i -g create-next-app.
Add the path variable in system.
C:\Users{User_name}\AppData\Roaming\npm