简体   繁体   English

运行“ create-react-app”失败

[英]Run 'create-react-app' failed

I came across the following problem 我遇到以下问题

I ref react-app tutorials to create a react-app demo. 我参考react-app教程来创建react-app演示。 When I run create-react-app my-app command, it failed. 当我运行create-react-app my-app命令时,它失败了。

在此处输入图片说明

After that, I have changed npm mirror to taobao.org (in China). 之后,我将npm mirror更改为taobao.org (在中国)。 But it also failed. 但是它也失败了。

npm config set registry https://registry.npm.taobao.org

So, how to slove the problem. 因此,如何解决这个问题。

  1. I uninstall yarn and reinstall . 我卸载yarn并重新安装。
  2. Reinstall node 重新安装节点
  3. Reinstall react-app. 重新安装react-app。
  4. Need administrator's permission to install react-app in CMD. 需要管理员的许可才能在CMD中安装react-app。

With the method, I install react-app successfully! 使用该方法,我成功安装了react-app!

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

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