Firebase CLI deploy error: “Deploys to runtimes below Node.js 10 are now disabled in the Firebase CLI.”

雨燕双飞 提交于 2021-01-03 03:13:44

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/65316988/firebase-cli-deploy-error-deploys-to-runtimes-below-node-js-10-are-now-disable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!