初始化 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. Echars折线配置详解

    Echars折线配置详解 比如做成如下效果图: 所有的配置如下: var option = { tooltip: { // 提示框 trigger: 'axis', // 触发类型(坐标轴触发) al ...

  2. mysql基础讲解

  3. 2018-2019-2 20175105王鑫浩 实验二《Java面向对象程序设计》实验报告

    一.实验步骤 1.初步掌握单元测试和TDD 2.理解并掌握面向对象三要素:封装,继承,多态 3.初步掌握UML建模 4.熟悉S.O.L.I.D原则 5.了解设计模式 二.实验内容 (一).单元测试 1 ...

  4. AI 机器学习基础

    深度学习是机器学习的一个特定分支. 1.学习算法 对于某类任务T和性能度量P, 2.线性回归 3.正规方程(normal equation) 4.监督学习(supervised learning) 5 ...

  5. ubuntu 14.04 sudo apt-get 简单 安装 ffmpeg

    一种方法是这样的sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next sudo apt-get update sudo apt-get in ...

  6. SkylineGlobe 移动端开发测试

    基于SkylineGlobe提供的安卓版本SDK,在已有菜单中增加自定义内容,测试代码如下: 新增加文件ZhaoHeContainer.java package com.skyline.terraex ...

  7. I2S音频总线学习

    IIS音频总线学习(一)数字音频技术 一.声音的基本概念 声音是通过一定介质传播的连续的波. 图1 声波 重要指标: 振幅:音量的大小 周期:重复出现的时间间隔 频率:指信号每秒钟变化的次数 声音按频 ...

  8. 在centos 7上安装BIMServer

    下载bimserverwar-1.5.85.war https://github.com/opensourceBIM/BIMserver/releases mkdir -p /opt/bim cd / ...

  9. 【UFUN开发板评测】小巧而不失精致,简单而不失内涵——uFun开发板开箱爆照

    关于uFun学习板--"满满的爱和正能量" uFun是由@张进东 张工组织发起的一个开源的学习板,设计初衷是为了帮助学生更好的理解电子知识和开发技巧,同时又能对学生毕业找工作有很明 ...

  10. TCP 三次握手原理,你真的理解吗?

    最近,阿里中间件小哥哥蛰剑碰到一个问题——client端连接服务器总是抛异常.在反复定位分析.并查阅各种资料文章搞懂后,他发现没有文章把这两个队列以及怎么观察他们的指标说清楚. 因此,蛰剑写下这篇文章 ...