【发布时间】:2020-10-10 00:00:20
【问题描述】:
当我运行 firebase init 启动新项目时,会自动创建 package.json 文件(如下),当我转到 firebase 仪表板时,它会抛出此警告“
Starting NaN, NaN, we'll no longer support new deploys or updates of Node.js 8 functions. Starting NaN, NaN, we'll no longer support executions of existing Node.js 8 functions.
你如何初始化和指定版本?或者有什么解决方法?
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "eslint .",
"serve": "firebase emulators:start --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "8"
},
"dependencies": {
"firebase-admin": "^8.10.0",
"firebase-functions": "^3.6.1"
},
"devDependencies": {
"eslint": "^5.12.0",
"eslint-plugin-promise": "^4.0.1",
"firebase-functions-test": "^0.2.0"
},
"private": true
}
【问题讨论】:
-
您需要迁移到节点 10。medium.com/firebase-developers/…
标签: firebase google-cloud-functions package.json firebase-cli