安装
npm i -g create-react-app
create-react-app testApp
npm start
如果安装报错如下
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
changed 67 packages, and audited 68 packages in 2s
4 packages are looking for funding
run `npm fund` for details
2 high severity vulnerabilities
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
则
Node >= 14.0.0 and npm >= 5.6
npx create-react-app create-react-app
cd create-react-app
npm start