初始化 react项目时报错:

error eslint@5.12.0: The engine "node" is incompatible with this module. Expected version "^6.14.0 || ^8.10.0 || >=9.10.0". Got "8.9.4"
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

这是node版本不兼容导致的,升级node版本可以解决,不升级也可以解决,用下面的命令:

npx create-react-app my-app  --use-npm

  

官方issues:https://github.com/facebook/create-react-app/issues/5714 和 https://github.com/facebook/create-react-app/issues/3974

问题:

Guys, a few days ago, I installed `yarn` on my Mac just because it's necessary for a project where I'm involved.

My problem is that, now, when I create a new app with `CRA`, it's going to use `yarn` instead of `npm`. And, to be honest, I prefer `npm`.

Is there a way to force to use `npm` instead of `yarn`?
Or should I wait until finish the initial setup, then remove the `yarn.lock` file, the `node_modules` folder and then run `npm i`?

答案:

You can run CRA with `--use-npm` flag to force it to use npm.

error eslint@5.12.0: The engine "node" is incompatible with this module.的更多相关文章

  1. 安装Access Database Engine后,提示未注册Microsoft.ACE.OLEDB.12.0

    未注册Microsoft.ACE.OLEDB.12.0 ,下载安装 Microsoft Access Database Engine:https://www.microsoft.com/en-us/d ...

  2. Oops, 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine error

    环境: Win7 64位 + VS2005 + Office2013 64位 现象:程序为一个Excel导入程序,导入时报「'Microsoft.ACE.OLEDB.12.0' provider is ...

  3. Airflow安装异常:ERROR: flask-appbuilder 1.12.3 has requirement Flask<2,>=0.12, but you'll have flask 0.11.1 which is incompatible.

    1 详细异常: ERROR: flask-appbuilder 1.12.3 has requirement Flask<2,>=0.12, but you'll have flask 0 ...

  4. error : Could not load UI satellite dll 'TrackerUI.dll'. Make sure it exists in an LCID subdirectory of 'C:\Program Files (x86)\MSBuild\12.0\bin\'.

    原因  VS2013 + QT环境部署好后, 又安装了VS2015\ 解决方案:  在另一台电脑里重装VS2013, 并将  C:\Program Files (x86)\MSBuild\12.0\B ...

  5. The ‘Microsoft.ACE.OLEDB.12.0′ provider is not registered on the local machine. (System.Data)

    When you try to import Excel 2007 or later “.xlsx” files into an SQL Server 2008 database you may ge ...

  6. 使用kubeadm 安装 kubernetes 1.12.0

    目录 简介: 架构说明: 系统配置: 1.1 关闭防火墙 1.2 禁用SELinux 1.3 关闭系统Swap 1.4 安装docker 使用kubeadm部署Kubernetes: 2.1 安装ku ...

  7. 关于报错:The Microsoft.ACE. Oledb.12.0 provider was not registered on the local computer

    错误描述:The Microsoft.ACE. Oledb.12.0 provider was not registered on the local computer 最近在Web项目中做一个自动生 ...

  8. Centos 7.4搭建es7.12.0+Skywalking7.8.5

    Skywalking整体架构图和分布式追踪系统原理:https://blog.csdn.net/weixin_39866487/article/details/111581322 软件包版本1.ela ...

  9. Microsoft ACE OLEDB 12.0概念及用法

    首先需要清楚几个概念: Database engine(数据引擎):一些预先存储于数据库中的组件: Microsoft JET (Joint Engine Technology):Microsoft ...

随机推荐

  1. nested exception is org.apache.ibatis.reflection.ReflectionExceptio

    org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.Reflecti ...

  2. 使用js切割URL的参数

    对于一些开发场景,不使用Jsp或freemarker及其其他的模板引擎时,通常通过切割url获得对应的参数,然后通过AJAX与后台交互得到对应的数据 下面是演示实例: test.html <!D ...

  3. AI 梯度下降

    梯度下降(gradient descent),是一种用于最优化(通常是最小化),代价函数/损失函数/目标函数/误差函数/准则,的方法. 不过,最值有时很难找到,尤其是在高维情况下,所以常常把局部最优解 ...

  4. fastcgi_next_upstream error timeout invalid_header http_500 http_503(转)

    location / proxy_pass http://nodelist; fastcgi_next_upstream error timeout invalid_header http_500 h ...

  5. Mapreduce打印调试输出

    Mapreduce打印调试内容: 一.启动JobHistoryServer mr-jobhistory-daemon.sh start historyserver [hadoop@node11 sbi ...

  6. ThinkPad T43续命记

    // Description: 原作于2016年8月25日. Mr. Robot 最近有部叫<黑客军团>(Mr. Robot)的戏比较火.目前第二季已经出到一大半了,深得技术宅和技术宅仰慕 ...

  7. ASP.NET Core 登录失败。该登录名来自不受信任的域,不能与集成身份验证一起使用。

    原文:ASP.NET Core 登录失败.该登录名来自不受信任的域,不能与集成身份验证一起使用. 当进行数据迁移的时候提示 修改appsettings配置连接串的Trusted_Connection ...

  8. C# 异步上传图片案例

    好久没写博客了,都感觉自己快堕落了!今天随性写一篇关于异步上传图片的程序及插件! 说是程序及插件,其实程序占大头,所谓的插件只是两个JS.分别为:jquery.html5upload.js 和 jqu ...

  9. RuntimeError: Python is not installed as a framework 错误解决方案

    在virtualenv环境下使用matplotlib绘图时遇到了这样的问题: >>> import matplotlib.pyplot as pltTraceback (most r ...

  10. webpack笔记

    打包 img src src 必须以 点(.) 开始,才能被打包. 如: ./img/logo.png ../img/logo.png 使用 process a.js window.Base_Url ...