create-react-app 创建工程报错 node版本不匹配问题的解决办法

情况

create-react-app 版本 v1.4.3
npm create-react-app hooks 创建应用时报错

error @typescript-eslint/eslint-plugin@2.30.0: The engine "node" is incompatible with this module. Expected version "^8.10.0 || ^10.13.0 || >=11.10.1".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

解决办法

1、查看当前node -v的版本 为 v11.8.0
2、看来要升级下node的版本 大于v11.10以上 
3、安装一个node的管理工具n
npm i n -g

安装node的最新版本
sudo n stable


查看最新版本
node -v

再次执行创建应用指令即可
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容