简体   繁体   English

使用 npm create-react-app 不起作用?

[英]using npm create-react-app is not working?

I tried to create react app with the npm create-react-app appname and it will return back to me the same line to type in codes.我尝试使用npm create-react-app appname 创建 React 应用程序,它会返回给我同一行以输入代码。

I also tried using npx but it also prompt me errors.我也试过使用npx但它也提示我错误。 npm create-react-app error npm 创建反应应用程序错误

It was already indicated by the people in the comments and an answer, but still, here's the issue: When you used npx , you mistyped create-react-app as create-reach-app .人们已经在评论和答案中指出了这一点,但问题仍然存在:当您使用npx ,您将create-react-app错误输入为create-reach-app So, run npx create-react-app appname .因此,运行npx create-react-app appname Also, if you installed node.js correctly, you might not need to include npx in all commands and you can simply use create-react-app appname and it should work absolutely fine.此外,如果您正确安装了 node.js,您可能不需要在所有命令中都包含npx ,您可以简单地使用create-react-app appname ,它应该可以正常工作。

npx命令中有一个错字。

I suggest you two ways of solving the problem.我建议你两种解决问题的方法。 please check and try this:)请检查并尝试这个:)

  1. create-react-app appname (type without npm) create-react-app appname(不带 npm 的类型)
  2. npx create-react-app appname npx create-react-app 应用名称

React website here 在这里反应网站

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM