creat react app报错的解决办法:1、通过“npm config set registry https://registry.npm.taobao.org”切换淘宝镜像源;2、通过执行“E:\workspace\demo\p4>npx create-react-app todolist”命令重新安装即可。
本教程操作环境:Windows10系统、react18.0.0版、Dell G3电脑。
creat react app 报错怎么办?
create-react-app安装报错
1. 错误原因
当创建React应用时候,执行 npx create-react-app todolist, 报以下错误:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
2. 解决办法
切换淘宝镜像源
1 2 3 4 |
|
执行结果如下:
1 2 3 4 |
|
3. 再次安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
推荐学习:《react视频教程》
The above is the detailed content of What should I do if I get an error in creat react app?. For more information, please follow other related articles on the PHP Chinese website!