npx create-react-app my-app之后出现不兼容警告

问题描述

我使用了npx create-react-app my-app 但它显示以下错误。如果期望创建一个反应项目该怎么办。发生了以下警告。

C:\Users\dell\OneDrive\Desktop\react>npx create-react-app reactapp

Installing packages. This might take a couple of minutes.
Installing react,react-dom,and react-scripts with cra-template...

yarn add v1.22.5
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and Failed compatibility check. Excluding it from installation.
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and Failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 23 new dependencies.
info Direct dependencies
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
info All dependencies
├─ @babel/[email protected]
├─ ... some dependencies here ...
└─ [email protected]
Done in 35.57s.

解决方法

重新安装GIT,然后重试。我的CREATE-REACT-APP提供了相同的错误,然后重新安装git即可解决该错误