A template was not provided. This is likely because you're using an outdated version of create-react

在使用create-react-app创建项目时,控制台爆出这个 

A template was not provided. This is likely because you're using an outdated version of create-react-app.
Please note that global installs of create-react-app are no longer supported.

解决方案:

1、卸载老版本

npm uninstall -g create-react-app

记得查看下是否卸载成功

which create-react-app 

如果你像我一样提示 (/usr/local/bin/create-react-app)

请运行rm -rf /usr/local/bin/create-react-app

以删除此

2、安装新版本 

npm install -g create-react-app

发布了122 篇原创文章 · 获赞 25 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/HuoYiHengYuan/article/details/104127758
今日推荐