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,当然成功啦。
这里写图片描述

参考原文!

lalala,结束!

猜你喜欢

转载自blog.csdn.net/qq_39083004/article/details/80559581