React create-react-app创建项目时,控制台爆出这个错误

今天在安装react脚手架模板项目的时候出现错误如下

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.
You can fix this by running npm uninstall -g create-react-app or yarn global remove create-react-app before using create-react-app again.

 

但是我尝试了几次卸载依然不能成功。

应该是以前安装过有老版本的缓存

 

解决方法: 删除node安装目录的 C:\node\node_global 和 C:\node\node_cache的缓存  重新npm install -g create-react-app

posted @ 2021-04-07 10:45  姓蜀名黍  阅读(447)  评论(0编辑  收藏  举报