【问题标题】:npx create-react-app -> The engine "node" is incompatible with this module. Expected version ">= 10.x". Got "8.16.0" - Arch Linuxnpx create-react-app -> 引擎“节点”与此模块不兼容。预期版本 ">= 10.x"。得到“8.16.0”——Arch Linux
【发布时间】:2021-04-20 20:08:16
【问题描述】:

我知道这已经来过很多次了,但就是不管用。我使用 Arch Linux。每次我尝试运行时

npx create-react-app my-app

npm create-react-app my-app

我明白了

error @pmmmwh/react-refresh-webpack-plugin@0.4.3: The engine "node" is incompatible with 
this module. Expected version ">= 10.x". Got "8.16.0"
error Found incompatible module.

当我输入node -v 时,我得到14.16.1npm -v -> 7.10.0 看起来节点版本似乎没有更新到 14.x 版本。也许? 我已经尝试更新sudo npm install -g npmsudo n stable

当我尝试sudo npm install npm@latest -g 时,我得到了很多Missing write access to /usr/local/lib/node_modules/............

【问题讨论】:

    标签: node.js reactjs create-react-app


    【解决方案1】:

    解决方法是我通过pacmanSnap Store(我不知道)安装了节点,我在WebStorm 中看到安装了一些节点v 8.16.0。所以我卸载了snap version,它正在工作。看起来create-react-app 使用的是snap version

    【讨论】:

    • 谢谢,伙计...我真的为这个错误苦苦挣扎了很长时间
    猜你喜欢
    • 2021-05-31
    • 2022-10-07
    • 2021-11-26
    • 1970-01-01
    • 1970-01-01
    • 2018-04-10
    • 2020-03-06
    • 2020-06-29
    • 2021-10-28
    相关资源
    最近更新 更多