为什么 React Creat 应用程序中缺少 SRC 和公用文件夹?



我正在尝试使用 npx 创建创建应用程序 创建反应应用程序 我的应用程序

我有 npm 6.13

和节点:12.14.1

我厌倦了在创建-反应-应用程序中遵循灵魂,不会生成公共和 src 文件夹,因此无法启动

但它不起作用?

有机会吗?

您可能已经在全球范围内安装了create-react-app。 但是NPX始终使用最新版本的create-react-app。 请检查创建-反应-应用程序版本

create-react-app -v

并通过检查 Changelog.md 来确保其最新。 如果没有,请尝试通过以下方式卸载全局包

sudo npm uninstall -g create-react-app

确保您已全局卸载,然后尝试运行

npx create-react-app <project_name>

最初尝试使用但没有成功:npm rm -g create-react-appnpm install -g create-react-appnpx create-react-app <your-app-name>

以下命令有效:npx --ignore-existing create-react-app <Your-AppName>

最新更新