简体   繁体   English

引擎“节点”与此模块不兼容。 预期版本“7.5.0”。 得到“15.13.0”

[英]The engine "node" is incompatible with this module. Expected version "7.5.0". Got "15.13.0"

one of my friends sent me a project using react and node and i tried to run it with yarn.我的一个朋友给我发了一个使用 react 和 node 的项目,我尝试用 yarn 运行它。 Each time i run this command i got this error: The engine "node" is incompatible with this module.每次运行此命令时,我都会收到此错误:引擎“节点”与此模块不兼容。 Expected version "7.5.0".预期版本“7.5.0”。 Got "15.13.0".得到“15.13.0”。 I just want to know how update the react version of a project我只想知道如何更新项目的反应版本

Have a good day祝你有美好的一天

You could use this npm package , but be aware of breaking changes especially as it seems to be a very old version.您可以使用此 npm package ,但请注意重大更改,尤其是因为它似乎是一个非常旧的版本。

A better approach may be to use nvm - node version manager (or nvm-windows if that is your operating system) to install and use an older - compatible version of node, eg v7.5.0.更好的方法可能是使用nvm -节点版本管理器(或nvm-windows ,如果那是您的操作系统)来安装和使用较旧的节点兼容版本,例如 v7.5.0。

You can change your package.json您可以更改您的 package.json

 "engines": { "node": ">=7.5.0"},

This will make the projects run with node 7.5.0 or newer versions.这将使项目使用节点 7.5.0 或更高版本运行。 Also using nvm也使用 nvm

nvm install version_you_want 
nvm use version_you_want

Check node and npm versions检查节点和 npm 版本

node -v
npm -v

Other option is to use其他选择是使用

yarn install --ignore-engines纱线安装--忽略引擎

See this post: How to fix engine "node" version?看到这篇文章: 如何修复引擎“节点”版本?

In my case I was gettin the same error because I didn't set the.env file就我而言,我遇到了同样的错误,因为我没有设置 .env 文件

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 引擎“节点”与此模块不兼容。 预期版本“&gt; 0.4.x &lt; 0.9.0”。 有“12.22.1”吗? 如何解决这个问题 - The engine “node” is incompatible with this module. Expected version “> 0.4.x < 0.9.0”. Got “12.22.1” ? How to solve this 引擎“节点”与此模块不兼容。 预期版本“12.x”。 得到“14.8.0” - The engine "node" is incompatible with this module. Expected version "12.x". Got "14.8.0" 引擎“节点”与该模块不兼容。 预期版本“XXX”。 得到了“XXX” - The engine "node" is incompatible with this module. Expected version "X.X.X". Got "X.X.X" (在Rails上反应)引擎“节点”与此模块不兼容。 预期版本“…” - (React on Rails) The engine “node” is incompatible with this module. Expected version “…” npx create-react-app -&gt; 引擎“节点”与此模块不兼容。 预期版本 "&gt;= 10.x"。 得到“8.16.0”-Arch Linux - npx create-react-app -> The engine "node" is incompatible with this module. Expected version ">= 10.x". Got "8.16.0" - Arch Linux 错误 find-up@4.1.0:引擎“节点”与此模块不兼容。 预期版本“&gt;=8”。 Ember js + Heroku 部署 - error find-up@4.1.0: The engine "node" is incompatible with this module. Expected version ">=8". Ember js + Heroku Deployment google cloud build - functions@:引擎“节点”与此模块不兼容。 预期版本“10” - google cloud build - functions@: The engine "node" is incompatible with this module. Expected version "10" create-react-app&gt;错误css-loader@1.0.0:引擎“节点”与此模块不兼容。 预期版本“&gt; = 6.9.0 &lt;7.0.0 || &gt; = 8.9.0” - create-react-app > error css-loader@1.0.0: The engine “node” is incompatible with this module. Expected version “>= 6.9.0 <7.0.0 || >= 8.9.0” 错误 eslint@5.6.0:引擎“节点”与此模块不兼容。 尝试创建反应应用程序时 - error eslint@5.6.0: The engine "node" is incompatible with this module. when trying to create-react-app 引擎“节点”与该模块不兼容 - The engine "node" is incompatible with this module
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM