我已经创建了一个Firebase云函数项目,其中默认添加了以下依赖项和以下引擎:
"dependencies": {
"firebase-admin": "^8.0.0",
"firebase-functions": "^3.1.0"
},
"engines": {
"node": "8"
}
每当我运行yarn add
命令时,会出现以下错误并且依赖项未被添加:error firebase-admin@8.4.0: The engine "node" is incompatible with this module. Expected version "^8.13.0 || >=10.10.0". Got "8.11.4"
我尝试将节点引擎版本更改为10 "engines": {"node": "10"}
,但现在在使用yarn add时出现以下错误:
I then try change node engine version to 10 "engines": {"node": "10"}
, but now get the following error when I yarn add:
error functions@: The engine "node" is incompatible with this module. Expected version "10". Got "8.11.4"
如何解决这个问题?