前端

A template was not provided. Thi

2020-03-17  本文已影响0人  若年

在使用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
上一篇下一篇

猜你喜欢

热点阅读