我正在尝试使用 npx create-react-app my-app 创建创建应用程序
我有 npm 6.13
和节点:12.14.1
我厌倦了遵循create-react-app 中的灵魂不生成公共和 src 文件夹因此无法开始
但它不工作?
任何机会 ?
我正在尝试使用 npx create-react-app my-app 创建创建应用程序
我有 npm 6.13
和节点:12.14.1
我厌倦了遵循create-react-app 中的灵魂不生成公共和 src 文件夹因此无法开始
但它不工作?
任何机会 ?
最初尝试使用但没有奏效:npm rm -g create-react-app
, npm install -g create-react-app
, npx create-react-app <your-app-name>
.
以下命令有效:npx --ignore-existing create-react-app <Your-AppName>
你可能已经全局安装了 create-react-app。但 npx 始终使用最新版本的 create-react-app。请通过以下方式检查 create-react-app 版本
create-react-app -v
并通过检查Changelog.md确保其最新。如果不尝试卸载全局包
sudo npm uninstall -g create-react-app
确保您已全局卸载,然后尝试运行
npx create-react-app <project_name>