更新后Node.js无法创建应用

时间:2018-10-02 15:39:06

标签: node.js reactjs eslint

我正在使用Window的bash创建一个React应用广告,但出现此错误。我尝试更新eslint并使用npx create-react-app xyz,但是,出现以下错误消息。

$ npx create-react-app demo-counter
npx: installed 1 in 14.364s
Path must be a string. Received undefined
C:\Users\Rob\AppData\Roaming\npm\node_modules\create-react-app\index.js

Creating a new React app in C:\Users\Rob\webprojects\september\demo-counter.

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

yarn add v1.9.4
info No lockfile found.
[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".
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 C:\Users\Rob\webprojects\september\demo-counter has failed.

1 个答案:

答案 0 :(得分:0)

看起来您可能位于不受支持的节点版本上。在终端中输入node -v时输出什么?