创建react项目失败时
- 解决方案1:执行下面命令
npm uninstall -g create-react-app
npx clear-npx-cache
npx create-react-app yuan
- 解决方案2: 方案1不起作用,指定版本创建项目
npx create-react-app@5.0.0 my-app
创建react项目失败时
npm uninstall -g create-react-app
npx clear-npx-cache
npx create-react-app yuan
npx create-react-app@5.0.0 my-app