create-react-app安装出错问题解决

在用create-react-app的时候

报错

错误如下图:

在SF上查到说是或许是因为国内npm拉去资源,拉去不到的问题,可以试着从解决创建create-react-app慢的方法着手:

解决方法:

//换源
npm config set registry https://registry.npm.taobao.org
//配置后通过以下方法验证是否成功
npm config get registry

 

设置成功后,再次执行create-react-app,当然成功啦

posted @ 2019-04-17 11:37  rachelch  阅读(2886)  评论(0编辑  收藏  举报