【发布时间】:2021-07-01 18:33:56
【问题描述】:
我的 firebase deploy 有问题,在 VS Code 中执行命令,显示下一条消息, 我试过安装,卸载依赖,没有解决方案。 谢谢 终端:
jonatan@Jona:~/KOA/s2i-backoffice-web$ firebase deploy
=== Deploying to 'proyecto-s2i'...
i deploying functions, hosting
⚠ functions: package.json indicates an outdated version of firebase-functions.
Please upgrade using npm install --save firebase-functions@latest in your functions directory.
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
✔ functions: required API cloudbuild.googleapis.com is enabled
✔ functions: required API cloudfunctions.googleapis.com is enabled
i hosting[proyecto-s2i]: beginning deploy...
i hosting[proyecto-s2i]: found 263 files in public
✔ hosting[proyecto-s2i]: file upload complete
Error: An unexpected error has occurred.
File firebase-debug.log, this is the message
[debug] [2021-07-01T15:17:30.726Z] TypeError: Canno t read property 'length' of undefined
at Object.functionMatchesAnyGroup (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/functionsDeployHelper.js:11:23)
at have.filter (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/deploymentPlanner.js:25:56)
at Array.filter (<anonymous>)
at calculateRegionalFunctionChanges (/usr /local/lib/node_modules/firebase-tools/lib/deploy/functions/deploymentPlanner.js:25:17)
at Object.createDeploymentPlan (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/deploymentPlanner.js:53:50)
at release (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release.js:24:48)
at process._tickCallback (internal/process/next_tick.js:68:7)
[error]
[error] Error: An unexpected error has occurred.
【问题讨论】:
-
您好,请分享您的代码,以便我们查看问题所在。乍一看说你有一个未定义的对象,你正在尝试访问它的长度属性
-
您好,属性 length 是安装了 firebase-tools 的依赖项。
标签: firebase deployment firebase-authentication cloud firebase-tools