【发布时间】:2022-03-18 12:00:20
【问题描述】:
在react documentation中提到了创建react app的官方方法
我认为 npx create-react-app project 会自动检测 yarn,但在我的情况下它没有,并使用我不想要的 npm 创建反应应用程序。
第二个选项让我使用yarn create react-app 创建反应应用,但它显示多个警告:
warning " > @testing-library/user-event@13.5.0" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning "react-scripts > tailwindcss@3.0.22" has unmet peer dependency "autoprefixer@^10.0.2".
warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-syntax-flow@^7.14.5".
warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-transform-react-jsx@^7.14.9".
warning "react-scripts > react-dev-utils > fork-ts-checker-webpack-plugin@6.5.0" has unmet peer dependency "typescript@>= 2.7".
warning "react-scripts > eslint-config-react-app > @typescript-eslint/eslint-plugin > tsutils@3.21.0" 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".
那么有没有更好的方法来使用 npx(使用 yarn)创建反应应用程序
【问题讨论】:
标签: reactjs linux ubuntu npm yarnpkg