安装
->~ npm install -g create-react-app
->~ yarn create react-app my-app || create-react-app my-app
error eslint@5.6.0: The engine "node" is incompatible with this module. Expected version "^6.14.0 || ^8.10.0 || >=9.10.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts --cwd /Users/xx/testing-react/my-app has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting my-app/ from /xx/testing-react
- 遇到报错解决办法
确认问题是node版本过低,安装nvm切换node版本
macOs-安装nvm
接着再执行一遍上面的命令,下图结果为安装成功