在部署到AWS时,我得到了以下纱线错误
error fs-extra@7.0.1: The engine "node" is incompatible with this module. Expected version ">=6 <7 || >=8". Got "7.0.0"
你知道怎么解决吗?
如果我在package.json中指定引擎,这将奏效吗
{
"engines" : {
"node" : ">=8.0.0"
}
}
在部署到AWS时,我得到了以下纱线错误
error fs-extra@7.0.1: The engine "node" is incompatible with this module. Expected version ">=6 <7 || >=8". Got "7.0.0"
你知道怎么解决吗?
如果我在package.json中指定引擎,这将奏效吗
{
"engines" : {
"node" : ">=8.0.0"
}
}
当前回答
你可以试着忽略引擎:
$ yarn install—忽略引擎
OR
$ yarn global添加<你的应用>—忽略引擎
通过运行以下命令,你可以看到所有你可以忽略的内容:
$ yarn help | grep -- --ignore
--ignore-scripts don't run lifecycle scripts
--ignore-platform ignore platform checks
--ignore-engines ignore engines check
--ignore-optional ignore optional dependencies
其他回答
我的问题用yarn—ignore-engines解决了,但我不知道为什么以及如何解决。
你可以试着忽略引擎:
$ yarn install—忽略引擎
OR
$ yarn global添加<你的应用>—忽略引擎
通过运行以下命令,你可以看到所有你可以忽略的内容:
$ yarn help | grep -- --ignore
--ignore-scripts don't run lifecycle scripts
--ignore-platform ignore platform checks
--ignore-engines ignore engines check
--ignore-optional ignore optional dependencies
我现在发现了这个问题,用一个旧代码,然而,我解决了它: 纱升级
将Node.js更新到最新版本。
https://nodejs.org/en/download/
对我来说,有效的方法是将Node更新到最新版本。根据您的操作系统选择任何教程。
升级Node.js到最新版本