create-react-app运行出错问题解决

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/betty13006159467/article/details/89397192

在使用create-react-app创建react目录时出现以下错误
在这里插入图片描述

这是因为国内源无法拉取资源导致的,可以尝试换源解决问题

//换源
npm config set registry https://registry.npm.taobao.org
//验证是否换源成功
npm config get registry

在这里插入图片描述
再次运行代码

create-react-app todolist

运行过程中有点卡,我用手机开了个热点,电脑连接这个热点然后就成功了!!!
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/betty13006159467/article/details/89397192