Firebase CLI部署错误:“现在在Firebase CLI中禁用了部署到Node.js 10以下的运行时." [英] Firebase CLI deploy error: "Deploys to runtimes below Node.js 10 are now disabled in the Firebase CLI."
问题描述
我有一个使用Cloud Functions for Firebase的项目,并将Firebase CLI更新到版本9.0.0后,我收到一条错误消息:
错误:函数目录中的package.json有一个engine字段,不被支持.有效的选择是:{节点":"10"},{节点":"12"}和{"node":"14"}.
现在已在Firebase中禁用了部署到Node.js 10以下运行时的功能CLI.现有的Node.js 8函数将在2021-03-15停止执行.尽快将现有功能更新到Node.js 10或更高版本可能.
我知道现在不支持节点8,但是我想继续在Spark付款计划中部署和运行我的功能,该功能不需要付费,直到2021年3月15日一切关闭.
自版本9.0.0起,Firebase CLI已完全删除了节点8作为选项.如果您不能按照建议的建议升级到节点10(这也需要升级到付款计划),那么您将不得不降级CLI,直到3月15日节点8完全关闭之前,您都可以使用该CLI./p>
运行此命令以降级到版本9之前的最新CLI:
npm install -g firebase-tools @ 8
这将为您提供8.20.0的CLI版本,直到您选择再次升级.
I have a project using Cloud Functions for Firebase, and after updating the Firebase CLI to version 9.0.0, I am getting an error message:
Error: package.json in functions directory has an engines field which is unsupported. Valid choices are: {"node": "10"}, {"node":"12"}, and {"node":"14"}.
Deploys to runtimes below Node.js 10 are now disabled in the Firebase CLI. Existing Node.js 8 functions will stop executing on 2021-03-15. Update existing functions to Node.js 10 or greater as soon as possible.
I understand that node 8 is now unsupported, but I want to keep deploying and running my functions on the Spark payment plan which doesn't require billing until things are shut off on March 15, 2021. How can I do this?
Since version 9.0.0, the Firebase CLI has fully removed node 8 as an option. If you can't take the recommended advice of upgrading to node 10 (which requires also upgrading to a payment plan), then you will have to downgrade your CLI, which you can use until node 8 is shut off completely on March 15.
Run this to downgrade to the latest version of the CLI before version 9:
npm install -g firebase-tools@8
This should get you version 8.20.0 of the CLI until you choose to upgrade again.
这篇关于Firebase CLI部署错误:“现在在Firebase CLI中禁用了部署到Node.js 10以下的运行时."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!