首页 > 解决方案 > 删除并重新安装 create-react-app 会给我现有的项目带来问题吗?

问题描述

自去年 10 月以来,我一直在开发一个 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. 错误。

我阅读了文档并解决了这个问题,我应该先卸载 create-react-appnpm install -g create-react-app然后重新安装。我想知道这是否会对我的其他(非常重要的)项目和运行它造成任何问题npm start

标签: reactjscreate-react-app

解决方案


当您使用创建应用程序时create-react-app,它已经在您的旧项目中安装了反应包和脚本。您不再需要create-react-app运行此项目。

随意卸载该软件包并仅用于npx create-react-app创建您的新项目。


推荐阅读