npx create-react-app -> 引擎"node"与此模块不兼容。预期版本 ">= 10.x" 。Got "8.16.0" - Arch Linux



我知道这已经出现过很多次了,但它就是不起作用。我使用 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/............

修复是我通过pacmanSnap Store安装了节点(我不知道),我在WebStorm中看到有一些节点v8.16.0安装。所以我卸载了snap version它正在工作。看起来create-react-app正在使用snap version

相关内容

最新更新