【发布时间】:2018-10-07 02:05:04
【问题描述】:
我在运行 create-react-app 之前从未出现过错误,但是当我今天在我的 Mac 上运行它时,我不断收到以下错误并且无法解决它。我试过更新节点、纱线、eslint、CRA,还清除了节点缓存,但没有任何效果。为什么会出现这个错误,我该如何解决它以便我可以安装 create-react-app?
Creating a new React app in /Users/...
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.10.1
[1/4] ???? Resolving packages...
[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.3.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/johnwolfe/printPackageTest/printtest has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting printtest/ from /Users/johnwolfe/printPackageTest
Done.
【问题讨论】:
标签: reactjs npm create-react-app yarnpkg