create-react-app

安装

->~ 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
    接着再执行一遍上面的命令,下图结果为安装成功
image.png

github地址

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容