首页 > 解决方案 > 错误 eslint@5.6.0:引擎“节点”与此模块不兼容。尝试创建反应应用程序时

问题描述

我正在尝试创建一个 React 应用程序,但我在控制台中收到以下错误。

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

yarn add v1.10.1
info No lockfile found.
[1/4]   Resolving packages...
warning react-scripts > eslint > file-entry-cache > flat-cache > circular-   json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
[2/4]   Fetching packages...
error eslint@5.6.0: The engine "node" is incompatible with this module.    Expected version "^6.14.0 || ^8.10.0 || >=9.10.0". Got "9.5.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      /Volumes/server2/Desktop/JavaScript/birdcage has failed.

  Deleting generated file... package.json
  Deleting birdcage / from /Volumes/server2/Desktop/JavaScript
  Done.

我已经尝试过brew upgrade node,但这似乎不起作用。任何有关如何解决此问题的想法将不胜感激。

标签: node.jshomebrew

解决方案


临时修复之一是运行yarn install --ignore-engines


推荐阅读