create-react-app新建项目不全问题

新版的create-react-app,如果你之前在电脑安装过全局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.

解决方案:

卸载

npm uninstall -g create-react-app

如果上面不能卸载可以用下面方法

yarn global remove create-react-app

卸载完,然后再用

npx create-react-app [project-name]

就可以了

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。