【发布时间】:2020-01-03 00:24:26
【问题描述】:
我创建了一个 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"},但现在当我添加纱线时出现以下错误:
error functions@: The engine "node" is incompatible with this module. Expected version "10". Got "8.11.4"
如何解决这个问题?
【问题讨论】:
-
在您尝试满足错误消息后,您的整个 package.json 文件究竟是什么样的?请编辑问题以显示它。
标签: node.js firebase npm google-cloud-functions yarnpkg